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).

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

# Perform conversion on an object of class `calc_rate`: data("sardine.rd")
#> Warning: data set ‘sardine.rd’ not found
x <- calc_rate(sardine.rd)
#> Error in calc_rate(sardine.rd): could not find function "calc_rate"
convert_DO(x, from = "percent", to = "mg L-1", t = 15, S = 35)
#> Error in convert_DO(x, from = "percent", to = "mg L-1", t = 15, S = 35): could not find function "convert_DO"
# Or, perform on a numeric convert_DO(100, from = "percent", to = "mg L-1", S = 33, t = 18)
#> Error in convert_DO(100, from = "percent", to = "mg L-1", S = 33, t = 18): could not find function "convert_DO"
data("sardine.rd")
#> Warning: data set ‘sardine.rd’ not found
convert_DO(sardine.rd[[2]], from = "percent", to = "torr", t = 15, S = 35)
#> Error in convert_DO(sardine.rd[[2]], from = "percent", to = "torr", t = 15, S = 35): could not find function "convert_DO"