Skip to content
Prev 5939 / 29559 Next

coordinates

On Fri, 19 Jun 2009, Agustin Lobo wrote:

            
This is by design - they get re-instated when you coerce to data.frame. 
The obvious alternative is:

library(sp)
data(meuse)
meuse[1,]
meuse <- SpatialPointsDataFrame(SpatialPoints(cbind(meuse$x, meuse$y)),
   data=meuse)
meuse[1,]

which you could can as a function with 3 or more arguments if you like.

Roger