set_individual_traits {corella} | R Documentation |
Set, create or modify columns with information of individual organisms
Description
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.
Usage
set_individual_traits(
.df,
individualID = NULL,
lifeStage = NULL,
sex = NULL,
vitality = NULL,
reproductiveCondition = NULL,
.keep = "unused"
)
Arguments
.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 |
Details
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
Value
A tibble
with the requested fields added/reformatted.
See Also
set_scientific_name()
for adding scientificName
and authorship information.
Examples
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
)