View source: R/set_individual_traits.R
set_individual_traits | R Documentation |
Format fields that contain measurements or attributes of individual
organisms to a tibble
using Darwin Core Standard. Fields include those
that specify sex, life stage or condition. Individuals can be identified by
an individualID
if data contains resampling.
In practice this is no different from using mutate()
, but gives some
informative errors, and serves as a useful lookup for fields in
the Darwin Core Standard.
set_individual_traits(
.df,
individualID = NULL,
lifeStage = NULL,
sex = NULL,
vitality = NULL,
reproductiveCondition = NULL,
.keep = "unused"
)
.df |
A |
individualID |
An identifier for an individual or named group of individual organisms represented in the Occurrence. Meant to accommodate resampling of the same individual or group for monitoring purposes. May be a global unique identifier or an identifier specific to a data set. |
lifeStage |
The age class or life stage of an organism at the time of occurrence. |
sex |
The sex of the biological individual. |
vitality |
An indication of whether an organism was alive or dead at the time of collection or observation. |
reproductiveCondition |
The reproductive condition of the biological individual. |
.keep |
Control which columns from .data are retained in the output.
Note that unlike |
Examples of lifeStage
values:
zygote
larva
adult
seedling
flowering
Examples of vitality
values:
alive
dead
uncertain
Examples of reproductiveCondition
values:
non-reproductive
pregnant
in bloom
fruit bearing
A tibble
with the requested fields added/reformatted.
set_scientific_name()
for adding scientificName
and authorship information.
df <- tibble::tibble(
name = c("Crinia Signifera", "Crinia Signifera", "Litoria peronii"),
latitude = c(-35.27, -35.24, -35.83),
longitude = c(149.33, 149.34, 149.34),
eventDate = c("2010-10-14", "2010-10-14", "2010-10-14"),
id = c(4421, 4422, 3311),
life_stage = c("juvenile", "adult", "adult")
)
# Reformat columns to Darwin Core Standard
df |>
set_individual_traits(
individualID = id,
lifeStage = life_stage
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.