Learn R Programming

respirometry (version 2.0.0)

conv_resp_unit: Convert units related to respirometry

Description

Converts units of measurement that are joined by " / " or " * ". This function expands upon conv_multiunit to incorporate O2 unit conversion and seawater volume-mass conversions.

Usage

conv_resp_unit(
  value,
  from,
  to,
  temp = 25,
  sal = 35,
  atm_pres = 1013.25,
  o2_conc_base = "per_l"
)

Arguments

value

a numeric vector giving the measurement value in its original units.

from, to

a string defining the unit with subunits separated by " / " or " * ". See Details for proper notation regarding O2 and seawater mass/volume.

temp

temperature (°C). Default is 25 °C.

sal

salinity (psu). Default is 35 psu.

atm_pres

atmospheric pressure (mbar). Default is 1013.25 mbar.

o2_conc_base

(optional) if converting between pO2 and [O2], should concentrations be "per_l" or "per_kg"? Default is "per_l".

Author

Matthew A. Birk, matthewabirk@gmail.com

Details

The O2 units supported by conv_o2 should be appended with "_O2" (e.g. "kPa_O2"; even "percent_o2_O2") and O2 unit concentrations should drop "per_l" or "per_kg" (e.g. "umol_O2"). To designate seawater mass-volume conversion, append the unit with "_seawater" (e.g. "kg_seawater").

See Also

conv_multiunit, conv_o2, rho

Examples

Run this code
# I read that an animal's MO2 is 1.92 ml O2/kg/min. What is this MO2 in umol O2/g/h?
conv_resp_unit(value = 1.92, from = "ml_O2 / kg / min", to = "umol_O2 / g / hr")

# Krogh's diffusion coefficient for oxygen through gills can be expressed as ml O2 / mm2 (gill
# surface area) / um (gill thickness) / torr (seawater pO2 - blood pO2) / minute at a given
# temperature.
# To convert to another unit:
conv_resp_unit(value = 1e-6, from = "ml_O2 / mm2 / um / torr / min",
to = "umol_O2 / cm2 / um / kPa / hr", temp = 20)

# Now, with a knowledge of gill morphometrics, seawater pO2, and blood pO2, I can compare
# gill diffusion with whole animal MO2.

Run the code above in your browser using DataLab