[R-sig-Geo] STFDF with n variables

Edzer Pebesma edzer.pebesma at uni-muenster.de
Sun Dec 16 19:53:46 CET 2012


Piero,

in your case id is simply an attribute, so it can have any value, as you
can see from:

stplot(stMeuse[,,1:4], mode = 'ts')

what is the special purpose of your IDs, what should they identify?

On 12/16/2012 07:42 PM, Piero Campalani wrote:
> Thank you Edzer,
> comments inline
> 
> On 16 December 2012 19:19, Edzer Pebesma <edzer.pebesma at uni-muenster.de>wrote:
>>
>> Yes, that works:
>>
>>> class(stMeuse)
>> [1] "STFDF"
>> attr(,"package")
>> [1] "spacetime"
>>> dim(stMeuse)
>>     space      time variables
>>        10         2         4
>>
> 
> I could see that a STFDF object was created, but I still have some concern
> with regard to the "id" which need to be attached to the data.frame .
> 
> With regards to my example, I tried as well with reverse-order IDs:
>> ds <- cbind(ds, time=sort(rep(dts,10)), id=nrow(ds):1)
> ...or with duplicated IDs like:
>> ds <- cbind(ds, time=sort(rep(dts,10)), id=rep(1:10,2))
> and the final stMeuse object still seemed the same by looking at
> stplot(stMeuse).
> I guess they are not bound to the locations of the spatial object (points
> in `meuse` in this case).
> 
> 
>> (also note that with the CRAN version of spacetime, you'd need to load
> 
> package zoo first in order to run your script)
>>
> 
> Got it, thanks ;)
> 
> Piero
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list