pdRaster: assign function

Description Usage Arguments Value See Also Examples

View source: R/pdRaster_v4.1.R

Description

Assign unknown tissue isotope to calibrated precipitation isoscape.

Usage

1
pdRaster(r, prior =NULL, unknown, mask = NULL, genplot = T, saveFile = T)

Arguments

r

Output of calRaster, or RasterStack or RasterBrick with two layers. The tissue-calibrated isoscape raster (mean and sd) obtained from rescale function, or user provides

prior

raster. This is an optional raster layer with prior probabilities, which should has the same projection, resolution and extent as the isoscape raster.

unknown

data.frame. First column should be unique sample ID, and second column should be tissue d2H values of the individuals for which the assignments will be made.

mask

SpatialPolygonsDataFrame. This mask will constrain the assignment area. If this is not provided, a default of mask of rescaled.mean is used.

genplot

logical. Generate summary plots in R (TRUE [default]) or not (FALSE).

saveFile

logical. Save the results (TRUE [default]) or not (FALSE)).

Value

returns an object of class RasterStack or RasterLayer that includes a probability density raster for each individual in "unknown". pdRaster writes individual rasters in GTiff format to disk in the working directory for each individual in "unknown".

See Also

calRaster

Examples

1
2
3
4
5
6
7
8
data(naMap)
data(d2h_world)
d <- subOrigData(taxon = c("Homo sapiens"), mask = naMap)
r <- calRaster(known = d, isoscape = d2h_world, mask = naMap)
id <- "smile"
d2H <- -80
un <- data.frame(id,d2H)
asn <- pdRaster(r, unknown = un, mask=naMap)

SPATIAL-Lab/isorig documentation built on Aug. 13, 2019, 11:02 p.m.