View source: R/set_abundance.R
set_abundance | R Documentation |
In some field methods, it is common to observe more than one individual
per observation; to observe abundance using non-integer measures such as
mass or area; or to seek individuals but not find them (abundance of zero).
As these approaches use different Darwin Core terms, this function assists in
specifying abundances to a tibble
using Darwin Core Standard.
In practice this is no different from using mutate()
, but gives some
informative errors, and serves as a useful lookup for how columns with
abundance information are represented in the Darwin Core Standard.
set_abundance(
.df,
individualCount = NULL,
organismQuantity = NULL,
organismQuantityType = NULL,
.keep = "unused"
)
.df |
A |
individualCount |
The number of individuals present |
organismQuantity |
A number or enumeration value for the quantity of
organisms. Used together with |
organismQuantityType |
The type of quantification system used for
|
.keep |
Control which columns from .data are retained in the output.
Note that unlike |
Examples of organismQuantity
& organismQuantityType
values:
27 (organismQuantity
) individuals (organismQuantityType
)
12.5 (organismQuantity
) % biomass (organismQuantityType
)
r (organismQuantity
) Braun-Blanquet Scale (organismQuantityType
)
many (organismQuantity
) individuals (organismQuantityType
)
A tibble
with the requested fields added/reformatted.
df <- tibble::tibble(
scientificName = c("Cacatua (Licmetis) tenuirostris",
"Cacatua (Licmetis) tenuirostris",
"Cacatua (Licmetis) tenuirostris"),
n_obs = c(1, 3, 4)
)
df |>
set_abundance(individualCount = n_obs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.