ph_to_rxnclass {aqp} | R Documentation |
Convert pH to/from Reaction Classes
Description
Convert pH to/from Reaction Classes
Usage
ph_to_rxnclass(x, halfclass = FALSE, as.is = FALSE, droplevels = TRUE)
rxnclass_to_ph(x, halfclass = FALSE, digits = 2, simplify = TRUE)
ReactionClassLevels(halfclass = FALSE, as.is = FALSE)
Arguments
x |
input pH values (numeric; |
halfclass |
Split the standard classes in half for higher resolution? Default: |
as.is |
logical. Should character vectors be converted to factors? Default: |
droplevels |
logical. Drop unused levels in factors? Default: |
digits |
Number of digits after decimal place; Default: |
simplify |
Simplify list result to numeric vector when length of result is 1? Default: |
Value
ph_to_rxnclass()
: a vector of reaction classes corresponding to numeric input in x
; if as.is=FALSE
an ordered factor using ReactionClassLevels()
rxnclass_to_ph()
: a list of data.frame objects containing high/low values of reaction class 1:1 with input; if simplify=TRUE and input is a data.frame.
ReactionClassLevels()
: ordered factor containing descriptive terms for reaction classes
Examples
ph_to_rxnclass(6.2)
rxnclass_to_ph("slightly acid")
rxnclass_to_ph(list(c("Slightly Acid", NA, "Moderately Acid"),
c("Slightly Acid", NA, "Strongly Acid")), simplify = FALSE)
ReactionClassLevels()