I want to prepare a dataset to make a variogram. But it doesn't work. How can I make a spatialpoints dataset of the x and y column, that are non-numeric?
library(sp)
head(data)   
   x       y    R
   3695.99 1713.02 1.85
   2    3696.99 1712.98 1.32
   3    3697.99 1712.95 0.92
   4    3699.02 1713.05 0.70
   5    3700.02 1713.01 0.44
   6    3701.02 1712.97 0.26
   > coordinates(data) <- ~ x + y
  Error in .local(obj, ...) : 
   cannot derive coordinates from non-numeric matrix
