Learn R Programming

⚠️There's a newer version (2.4.3) of this package.Take me there.

assignR

Basic

Data and tools supporting geographic assignment of materials based on their isotopic chemistry. Isoscapes (environmental isotope maps) can be generated externally or defaults (d2h_world.rda, d18o_world.rda) are provided in the package. Data from samples of known origin are used to calibrate the relationship between isoscape and sample values, and can be provided by the user or extracted from the package database (knownOrig.rda). Functions (calRaster, pdRaster) support calibrating the isoscape and inverting Bayes theorem to estimate the probability of origin for unknown samples across a geographic study domain. Functions (QA, plot.QA) allow quality assessment of assignment results and comparison of methods using split-sample tests and known origin data. Functions (oddsRatio, qtlRaster, jointP, unionP) support post-hoc classification of results, summarization of results from multiple samples, and comparison of support for different locations.

For step-by-step examples demonstrating all functions see https://spatial-lab.github.io/assignR/.

Install and load

install.packages("assignR")
library(assignR)

Package contents

Datasets

d2h_world.rda - Global growing season precipitation H isoscape from waterisotopes.org, including predicted mean and 95% confidence interval width

d18o_world.rda - Global growing season precipitation O isoscape from waterisotopes.org, including predicted mean and 95% confidence interval width

knownOrig.rda - Hydrogen and oxygen (if available) isotope values of known-origin samples including human hair, insect chitin and bird feathers, with location information (currently 2721 samples)

naMap.rda - North America outline

states.rda - 48 contiguous United States

Functions

subOrigData - Subset the known-origin stable isotope dataset included in this package

calRaster - Transform environmental isoscape to tissue isoscape

pdRaster - Assign sample to calibrated tissue isoscape based on tissue isotopic composition

qtlRaster - Select most likely region of origin from posterior probability surface (by cumulative percent area probability)

jointP - Calculate joint probability for individuals of common origin (product of probabilities)

unionP - Calculate probability that at least one individual came from each map location (union of probabilities)

oddsRatio - Calculate ratio of odds for two locations or areas (points or polygons)

QA - Quality analysis of geographic assignment

plot.QA - Plot results of one or more quality analyses from QA function

Copy Link

Version

Install

install.packages('assignR')

Monthly Downloads

580

Version

1.2.0

License

GPL-3

Maintainer

Gabe Bowen

Last Published

April 21st, 2020

Functions in assignR (1.2.0)

jointP

Joint probability of origin
calRaster

Rescale isoscape using linear regression
d18o_world

Global growing season H isoscape
oddsRatio

Odds ratio of points or regions
naMap

data: naMap
qtlRaster

Sample assignment using thresholds
states

data: states
pdRaster

Probability of origin surfaces
plot.QA

Plot quality metrics for geographic assignments
d2h_lrNA

Low resolution North American growing season H isoscape
subOrigData

Extract known origin sample data
unionP

Union probability of origin
d2h_world

Global growing season H isoscape
assignR

Tools for inferring geographic origin from isotopic data
QA

Quality assessment of geographic assignments
knownOrig

Isotope values for tissues of known origin