
Last chance! 50% off unlimited learning
Sale ends in
Get coordinates from spatial slot, if present.
# S4 method for SoilProfileCollection
coordinates(obj)# S4 method for SoilProfileCollection
coordinates(object) <- value
a SoilProfileCollection
A SoilProfileCollection
A formula specifying columns containing x and y coordinates
# NOT RUN {
data(sp5)
# coordinates are stored in x and y column of site
sp5$x <- rnorm(length(sp5))
sp5$y <- rnorm(length(sp5))
# coordinates takes a formula object as input
coordinates(sp5) <- ~ x + y
# }
Run the code above in your browser using DataLab