Skip to contents

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 DwC terms, this function assists in specifying abundances in a flexible way.

Usage

use_abundance(
  .df,
  individualCount = NULL,
  organismQuantity = NULL,
  organismQuantityType = NULL,
  .keep = "unused"
)

Arguments

.df

a data.frame or tibble that the column should be appended to.

individualCount

The number of individuals present

organismQuantity

A number or enumeration value for the quantity of organisms. Used together with organismQuantityType to provide context.

organismQuantityType

The type of quantification system used for organismQuantity.

.keep

Control which columns from .data are retained in the output. Note that unlike dplyr::mutate(), which defaults to "all" this defaults to "unused"; i.e. only keeps Darwin Core fields, and not those fields used to generate them.

Value

A tibble with the requested fields (see details).

Details

Examples of organismQuantity & organismQuantityType values:

  • 27 (organismQuantity) individuals (organismQuantityType)

  • 12.5 (organismQuantity) % biomass (organismQuantityType)

  • r (organismQuantity) Braun-Blanquet Scale (organismQuantityType)

  • many (organismQuantity) individuals (organismQuantityType)

Examples

df <- tibble::tibble(
  species_name = c("Cacatua (Licmetis) tenuirostris",
                   "Cacatua (Licmetis) tenuirostris",
                   "Cacatua (Licmetis) tenuirostris"),
  n_obs = c(1, 3, 4)
  )

df |>
  use_abundance(individualCount = n_obs)
#> ⠙ Checking 1 column: individualCount
#>  Checking 1 column: individualCount [310ms]
#> 
#> # A tibble: 3 × 2
#>   species_name                    individualCount
#>   <chr>                                     <dbl>
#> 1 Cacatua (Licmetis) tenuirostris               1
#> 2 Cacatua (Licmetis) tenuirostris               3
#> 3 Cacatua (Licmetis) tenuirostris               4