Re: [R] How to extend a slot of a class?

2012-03-16 Thread Igor Sosa Mayor
i think if you do: coord$time<-YOURTIMEVECTOR should work and the new vector is put correctly in the data slot. Maybe also coord@data$time<-YOURTIMEVECTOR On Wed, Mar 14, 2012 at 01:39:20PM +0100, Marco Smolla wrote: > Hej hej, > is there a way to extend the SpatialPointsDataFrame data slot?T

[R] How to extend a slot of a class?

2012-03-14 Thread Marco Smolla
Hej hej, is there a way to extend the SpatialPointsDataFrame data slot?This is the structure of an object of it:> str(coord) Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 214 obs. of 2 variables: .. ..$ location.long: num [1:214] -79.8 -79.8