rsp function(s) to reconfigure data.frames (and similar
object classes) for use with data and functions in respeciate
.
rsp_build_x(x, profile_id, profile_name, species_name, species_id, value, ...)
rsp_build_simx(m, n = 1, ...)
data.frame
or similar (i.e.
something that can be coerced into a data.frame
using
as.data.frame
) to be converted into a respeciate
object.
(character
) The names of the columns
in x
containing profile names and identifiers, respectively. If not
already named according to respeciate
conventions, at least one
of these will need to be assigned.
(character
) The names of the columns
in x
containing species name and identifiers, respectively. If not
already named according to respeciate
conventions, at least one of these will
need to be assigned.
(character
) The name of the column in x
containing measurement values. If not already named according to respeciate
conventions, this will need to be assigned.
(any other arguments) currently ignored.
respeciate
data set of source profiles intended to be used
as the source profiles (or M) matrix when building a simulated data set for
use with a PLS model (see rsp_pls_x
)
a numeric object, e.g. a vector
, matrix
, data.frame
or
a similar object that can be coerced into a data.frame
of suitable
dimensions for use as the source strength matrix (N) to build a simulated data set for
use with a PLS model (see rsp_pls_x
).
rsp_build
s attempt to build and return a respeciate
-like
object that can be directly compared with data from respeciate
.
rsp_build_x
is the standard object builder.
rsp_build_simx
builds a simulation of an x
data set based on
the `linear combination of profiles` model applied in conventional source
apportionment. (See below and rsp_pls_x
)
If you want to compare your data with profiles in the respeciate
archive,
you need respeciate
conventions when assigning species names and
identifiers. We are working on options to improve on this (and
very happy to discuss if anyone has ideas), but current best suggestion is:
(1) identify the respeciate
species code for each of the species in
your data set, and (2) assign these as species_code
when rsp_build
ing.
The function will then associate the species_name
from respeciate
species records.