prep_geom_vars: Creates a data.frame with covariates from rasters.

Description Usage Arguments Details

View source: R/prep_geom_vars.R

Description

Creates a data.frame with covariates from rasters.

Usage

1
prep_geom_vars(vars_paths, geom, crs = "lcc_mex")

Arguments

vars_paths

paths to rasters with covariates to consider, must include raster with id's (name of layer should contain "id")

geom

region sf, polygon(s) that determine analysis area

crs

string specifying projection (proj4string) passed to sf::st_transform, defaults to lcc (Mex)

Details

Reads tif files of discretized variables and id variable, cuts rasters with polygons in a polygon simple feature and returns a data.frame with the categorical variables, coordinates and id variable.


tereom/bnecology documentation built on Nov. 27, 2019, 2:15 p.m.