R/rsp.id.R
rsp.id.Rdrsp_id_ functions generate a vector of assignment
terms and can be used to subset or condition a supplied (re)SPECIATE
data.frame.
Most commonly, the rsp_id_ functions accept a single input, a
respeciate data.frame and return a logical vector of
length nrow(x), identifying species of interest as
TRUE. So, for example, they can be used when
subsetting in the form:
subset(rsp, rsp_id_nalkane(rsp))
... to extract just n-alkane records from a supplied respeciate
object rsp.
However, some accept additional arguments. For example, rsp_id_copy
also accepts a reference data set, ref, and a column identifier,
by, and tests rsp$by %in% unique(ref$by).
rsp_id_copy(rsp, ref = NULL, by = ".species.id")
rsp_id_nalkane(rsp)
rsp_id_btex(rsp)
rsp_id_pah16(rsp)rsp_id_copy outputs can be modified but, by default, it
identifies all species in the supplied reference data set.
rsp_id_nalkane identifies (straight chain) C1 to C40 n-alkanes.
rsp_id_btex identifies the BTEX group of aromatic hydrocarbons
(benzene, toluene, ethyl benzene, and M-, O- and P-xylene).