to_sp: Tranform a data.frame into a SpatialPoints

Description Usage Arguments Value

View source: R/spatial_nutrient.R

Description

Assign a Coordinate Reference System proj4 string and identify geographical coordinates in a data.frame to return a SpatialPoints object. Geographical coordinates must be present in the data.frame and named X, and Y.

Usage

1
to_sp(tab, crs_s)

Arguments

tab

a data.fram typically build via expand.grid()

crs_s

a proj4string coordinate reference system typically returned by sp::proj4string()

Value

a sp::SpatialPoints() for tab with a crs assigned and X, Y coordinates identified


mbask/fertplanspatial documentation built on July 5, 2020, 9:51 a.m.