Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

coordinates

Get coordinates from spatial slot


Description

Get coordinates from spatial slot, if present.

Usage

## S4 method for signature 'SoilProfileCollection'
coordinates(obj)

## S4 replacement method for signature 'SoilProfileCollection'
coordinates(object) <- value

Arguments

obj

a SoilProfileCollection

object

A SoilProfileCollection

value

A formula specifying columns containing x and y coordinates

Examples

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

aqp

Algorithms for Quantitative Pedology

v1.29
GPL (>= 3)
Authors
Dylan Beaudette [aut, cre], Pierre Roudier [aut, ctb], Andrew Brown [aut, ctb]
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.