I tried to run it on Ubuntu and got the same error, even using as.POSIXct():

> SNDMHT.gsm <- SoilGrids(obj=sd.ll, varname="SNDPPT",
+                         TimeSpan=list(begin="1999-02-01",
end="2001-07-01"))
Error in validityMethod(object) :
  no slot of name "TimeSpan.begin" for this object of class "GlobalSoilMap"
>

> SNDMHT.gsm <- SoilGrids(obj=sd.ll, varname="SNDPPT",
TimeSpan=list(begin=as.POSIXct("1999-02-01"), end=as.POSIXct("2001-07-01")))
Error in validityMethod(object) :
  no slot of name "TimeSpan.begin" for this object of class "GlobalSoilMap"


> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: i686-pc-linux-gnu (32-bit)
...
other attached packages:
[1] GSIF_0.4-1



On 18 June 2014 16:05, ejc <eric.j.christeson@gmail.com> wrote:

> Your dates aren't POSIXct dates.  I haven't tried this, but you probably
> need to check out 'as.POSIXct'
> http://stat.ethz.ch/R-manual/R-patched/library/base/html/as.POSIXlt.html
>
> Thanks,
> Eric
>
>
> On Wed, Jun 18, 2014 at 9:55 AM, Ruth Gonzaga <gonzagarg@yahoo.com.br>
> wrote:
>
>> Thanks for the suggestion, but I am still getting an error:
>>
>> > SNDMHT.gsm <- SoilGrids(obj=sd.ll, varname="SNDPPT",
>> TimeSpan=list(begin="1999-02-01", end="2001-07-01"))
>> Error in validityMethod(object) :
>>   no slot of name "TimeSpan.begin" for this object of class
>> "GlobalSoilMap"
>>
>> I am on Windows 8 using GSIF version 4-01. I will try to load this on a
>> Ubuntu Virtual Machine to see if it turns out differently.
>> Ruth
>>
>>
>> On 18 June 2014 14:41, Tomislav Hengl <hengl@spatial-analyst.net> wrote:
>>
>> >
>> > I would recommend switching to using "SoilGrids" class:
>> >
>> > http://gsif.r-forge.r-project.org/SoilGrids.html
>> >
>> > Hence, to produce objects of SoilGrids class you need to use:
>> >
>> > ## save to a "SoilGrids" object:
>> > SNDMHT.gsm <- SoilGrids(obj=sd.ll, varname="SNDPPT",
>> >              TimeSpan=list(begin="1999-02-01", end="2001-07-01"))
>> >
>> > In which case TimeSpan needs to be a list with names "begin", "end".
>> >
>> > To install the most recent version of the GSIF package (v0.4-2), please
>> > use:
>> >
>> > install.packages("GSIF", repos="http://R-Forge.R-project.org")
>> >
>> > For technical issues and problems with SoilGrids classes please also
>> > consider writing to the GSIF mailing list at:
>> >
>> > https://groups.google.com/forum/#!forum/global-soil-information
>> >
>> > HTH
>> >
>> > T. Hengl
>> >
>> > On 18-6-2014 3:12, Pascal Oettli wrote:
>> >
>> >> Hello,
>> >>
>> >> According to the help file, TimeSpan is an "object of class "list";
>> >> contains begin and end of the sampling period of class "POSIXct"". You
>> >> need to provide a list of POSIXct dates, not a vector.
>> >>
>> >> HTH
>> >> Pascal
>> >>
>> >> On Wed, Jun 18, 2014 at 8:56 AM, Ruth Gonzaga <gonzagarg@yahoo.com.br>
>> >> wrote:
>> >>
>> >>> Dear All,
>> >>> I have been trying to follow this tutorial on 3D modelling of soil
>> with
>> >>> the
>> >>> GSIF package:
>> >>> http://gsif.isric.org/doku.php?id=wiki:tutorial_eberg
>> >>>
>> >>> (code on:
>> >>> https://code.google.com/p/gsif/source/browse/trunk/
>> >>> eberg/tutorial_eberg.R)
>> >>>
>> >>> When I get to creating a GlobalSoilMap object (line 181):
>> >>>
>> >>> SNDMHT.gsm <- GlobalSoilMap(sd.ll, varname="SNDMHT",
>> >>> period=c("1999-02-01",
>> >>> "2001-07-01"))
>> >>>
>> >>> I get an error saying:
>> >>> Error in GlobalSoilMap(sd.ll, varname = "SNDMHT", period =
>> >>> c("1999-02-01",
>> >>> : unused argument (period = c("1999-02-01", "2001-07-01"))
>> >>>
>> >>> I think the tutorial is quite old. I checked the help and then
>> replaced
>> >>> "period" for "TimeSpan". I now get the following error:
>> >>>   Error in initialize(value, ...) :
>> >>>    invalid name for slot of class "GlobalSoilMap": TimeSpan.begin
>> >>>
>> >>>
>> >>> Here is some information on this function:
>> >>>
>> >>>> GlobalSoilMap function (obj, varname, TimeSpan = list(begin =
>> Sys.Date()
>> >>>>
>> >>> - 1, end = Sys.Date())) { if (!class(obj) == "list") { stop("Object of
>> >>> class 'list' required") } out = new("GlobalSoilMap", varname =
>> varname,
>> >>> TimeSpan.begin = TimeSpan, sd1 = as(obj[[1]],
>> "SpatialPixelsDataFrame"),
>> >>> sd2 = as(obj[[2]], "SpatialPixelsDataFrame"), sd3 = as(obj[[3]],
>> >>> "SpatialPixelsDataFrame"), sd4 = as(obj[[4]],
>> "SpatialPixelsDataFrame"),
>> >>> sd5 = as(obj[[5]], "SpatialPixelsDataFrame"), sd6 = as(obj[[6]],
>> >>> "SpatialPixelsDataFrame")) return(out)
>> >>> }
>> >>>
>> >>> Any ideas?
>> >>> Thanks.
>> >>>
>> >>> Ruth
>> >>>
>> >>>          [[alternative HTML version deleted]]
>> >>>
>> >>> _______________________________________________
>> >>> R-sig-Geo mailing list
>> >>> R-sig-Geo@r-project.org
>> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >>>
>> >>
>> >>
>> >>
>> >>
>> > _______________________________________________
>> > R-sig-Geo mailing list
>> > R-sig-Geo@r-project.org
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

	[[alternative HTML version deleted]]

