View source: R/dsmartr_prepare.R
prep_points | R Documentation |
Prepares dsmartr point inputs for use in
dsmartr::iterate()
.
prep_points(
known_points = NULL,
soil_id = NULL,
x_coords = NULL,
y_coords = NULL,
covariates = NULL
)
known_points |
sfc_POINT, SpatialPointsDataFrame or Data Frame object; represents locations where the soil class has been directly observed. Supply with spatial location (spatial data or x and y attributes), unique numeric ID, and soil class. |
soil_id |
String; name of column in |
x_coords |
String; name of column in |
y_coords |
String; name of column holding y-coordinate data. Only needed for non-spatial inputs. |
covariates |
RasterStack or RasterBrick; environmental covariate data. |
A data frame with two attributes: soil class code and corresponding raster cell index number.
The output of this function is an optional input for
iterate
. If known_points
is supplied as a data frame,
the x and y coordinates must match the covariate crs.
## Not run:
load('heronvale_known_sites')
load('heronvale_soilmap')
load('heronvale_covariates')
# data frame input:
pr_pts <- prep_points(known_points = heronvale_known_sites, soil_id = 'CLASS',
x_coords = 'x', y_coords = 'y', covariates = heronvale_covariates)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.