rsp function(s) to reconfigure data.frames (and similar object classes) for use with data and functions in re(SPECIATE).

rsp_build_x(
  x,
  profile_code,
  profile_name,
  species_name,
  species_id,
  value,
  ...
)

Arguments

x

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.

profile_name, profile_code

(character) The name of the column in x containing profile name and code records, respectively. If not already named according to SPECIATE conventions, at least one of these will need to be assigned.

species_name, species_id

(character) The name of the column in x containing species name and id records, respectively. If not already named according to SPECIATE conventions, at least one of these will need to be assigned.

value

(character) The name of the column in x containing measurement values. If not already named according to SPECIATE conventions, this will need to be assigned.

...

(any other arguments) currently ignored.

Value

rsp_builds attempt to build and return a (re)SPECIATE-like object that can be compared with data from re(SPECIATE).

Note

If you want to compare your data with profiles in the SPECIATE archive, you need to use EPA SPECIATE conventions when assigning species names and identifiers. Currently, 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 SPECIATE species code for each of the species in your data set, and (2) assign these as species_id when rsp_building. The function will then associate the species_name from SPECIATE species records.