isotopia-package: isotopia package

Description Details Author(s) See Also Examples

Description

R interface for working with isotopic data (abundances, ratios, delta values, etc.).

Details

This package provides several isotopic data types that can be initialized by calling the respective ratio, abundance, delta, fractionation_factor and intensity functions. Each data type has additional attributes (such as name of the major isotope for all data types, reference ratio for delta values, notation for delta and fractionation_factor, unit for intensity) and these are described in detail in the help for each function. The attributes of any existing isotope data object can be modified easily by calling set_attrib

Each data type can be initialized as a single vector of isotopic data or an entire system of isotope values for the same element (e.g. all oxygen or all sulfur isotopes). To intialize an isotope system, simply pass multiple named data vectors with the same number of data points to the initialization functions (please see examples for details). Isotope systems are returned as a data.frame with all the different components of the system as separate columns. This object can be treated and manipulated just like a regular R data.frame. The column headers are named after the individual named data vectors (e.g. ratio(`34S` = 0.1, `33S` = 0.2) will produce a data.frame with columns 34S and 33S) - careful if using names like '12C' that start with a number, they are not syntactically valid variable names in R and must be back quoted as `34S`. Isotope data objects in an isotope system that are not named generate columns named iso, iso.1, iso.2, ....

Isotope data objects (both single vectors and isotope systems) can then be converted to different data types using the respective to_ratio, to_abundance, to_delta functions. Notations can also be changed using switch_notation

Global options for isotopia can be set using set_iso_opts and standard reference ratios can be registered using register_standard

Author(s)

Sebastian Kopf

See Also

ratio, is.ratio, to_ratio, etc.

Examples

1
2
3
4
5
# these examples are for initializing isotope ratio objects but apply equally to other data types
ratio(0.1) # single value
ratio(c(0.1, 0.2, 0.3)) # multiple values
ratio(`13C` = c(0.1, 0.2, 0.3)) # named ratio
ratio(`33S` = c(0.1, 0.2, 0.3), `34S` = c(0.2, 0.4, 0.6), major = "32S") # isotope system

sebkopf/isotopia documentation built on March 20, 2018, 1:11 p.m.