calRaster {assignR} | R Documentation |
Rescale isoscape using linear regression
Description
This function uses known-origin tissue data to rescale a map of environmental isotope values to a map of tissue value (and associated uncertainty) using a linear regression model.
Usage
calRaster(known, isoscape, mask = NULL, interpMethod = 2, NA.value = NA,
ignore.NA = TRUE, genplot = TRUE, outDir = NULL, verboseLM = TRUE)
Arguments
known |
subOrigData or SpatVector. Known-origin tissue isotope data from the subOrigData function or provided by user. User-provided data must be formatted as a subOrigData object (see |
isoscape |
SpatRaster. Isoscape raster with two layers. The first one is the mean and the second is one standard deviation. |
mask |
SpatVector. Polygon layer that constrains the area of the output rasters. If this is not provided, the entire area of |
interpMethod |
numeric. 1 or 2. Designate one of two methods for extracting values from |
NA.value |
NA or numeric. Value representing the absence of data in |
ignore.NA |
logical. If NA values are extracted from |
genplot |
logical. Plot the results. |
outDir |
character string. Directory path to which output will be saved. If NULL no files are written. |
verboseLM |
logical. Print out the linear regression results. |
Value
Returns an object of class “rescale”.
isoscape.rescale |
SpatRaster. |
lm.data |
data.frame. Known origin data and extracted |
lm.model |
list. Linear regression model. |
See Also
Examples
# load hydrogen isotope data for human hair in North America
d = subOrigData(group = "Modern human", mask = naMap, niter = 100, genplot = FALSE)
# rescale from environmental isoscape to tissue isoscape
r = calRaster(d, d2h_lrNA, naMap)