convert_DO: Convert units of dissolved oxygen.

Description Usage Arguments Value Examples

View source: R/convert_DO.R

Description

This is a conversion function that performs basic conversions between units of dissolved oxygen in aquatic respirometry. Some units require temperature (t), salinity (S), and atmospheric pressure (P) to be specified. See unit_args() for details. For freshwater experiments, salinity should be set to zero (i.e. S = 0).

Usage

1
2
convert_DO(x, from = NULL, to = NULL, S = NULL, t = NULL,
  P = 1.013253)

Arguments

x

numeric vector or object of class calc_rate, auto_rate or adjust_rate. This is the value(s) that you want to convert from.

from

string. The unit to convert from. See unit_args() for details.

to

string. The unit to convert to. See unit_args() for details.

S

numeric. Salinity (ppt). Defaults to NULL. Used only in conversion of some units. See unit_args() for details.

t

numeric. Temperature(°C). Defaults to NULL. Used only in conversion of some units. See unit_args() for details.

P

numeric. Pressure (bar). Defaults to 1.013253. Used only in conversion of some units. See unit_args() for details.

Value

A list.

Examples

1
2
3
4
5
6
7
8
# Perform conversion on an object of class `calc_rate`:
x <- calc_rate(sardine.rd)
convert_DO(x, from = "percent", to = "mg L-1", t = 15, S = 35)

# Or, perform on a numeric
convert_DO(100, from = "percent", to = "mg L-1", S = 33, t = 18)

convert_DO(sardine.rd[[2]], from = "percent", to = "torr", t = 15, S = 35)

januarharianto/respR documentation built on Nov. 13, 2018, 1:21 p.m.