Generate isotope ratio objects. See isotopia for general information on initializing and converting isotope data objects.

ratio(..., major = get_iso_opts("default_major"), compound = "",
  weight = numeric(), single_as_df = FALSE)

Arguments

...

- numeric vectors (can be named) to turn into isotope ratio objects

major

- name of the major isotope in the single ratio or isotope system [optional]

compound

- name of the compound the isotopic values belong to [optional]

weight

- weight the isotope value (with a mass, concentration, etc.) for easy mass balance calculations. The default value is 1, i.e. an unweighted isotope value. If specified, weight must be a single value or a numeric vector of the same size as the data values. The weight of an isotope value obejct can be retrieved and (re)set with the weight function.

See also

Other isotope data types: abundance, delta, fractionation_factor, intensity

Examples

ratio(0.1) # single value
#> An isotope value object of type 'Ratio value': R #> [1] 0.1
ratio(c(0.1, 0.2, 0.3)) # multiple values
#> An isotope value object of type 'Ratio value': R #> [1] 0.1 0.2 0.3
ratio(`13C` = c(0.1, 0.2, 0.3)) # named ratio
#> An isotope value object of type 'Ratio value': R 13C/? #> [1] 0.1 0.2 0.3
ratio(`33S` = c(0.1, 0.2, 0.3), `34S` = c(0.2, 0.4, 0.6), major = "32S") # isotope system
#> An isotope system object of type 'Ratios' with R 33S/32S, R 34S/32S #> 33S 34S #> 1 0.1 0.2 #> 2 0.2 0.4 #> 3 0.3 0.6