Construct a spatial data object
Usage
morie_spatial(data, coords = c("lon", "lat"), crs = 4326)
Arguments
- data
A data.frame containing the coordinate columns and any
attribute variables.
- coords
Length-2 character vector naming the x/longitude and
y/latitude columns.
- crs
EPSG code of the coordinate reference system (4326 = WGS84
lon/lat degrees; 3857 = Web Mercator metres).
Value
A morie_spatial object.
Examples
d <- data.frame(lon = c(-79, -80), lat = c(43, 44), v = c(1, 2))
morie_spatial(d, c("lon", "lat"))
#> <morie_spatial> n=2 EPSG:4326 (degrees)