Skip to contents

Show taxon groups where all species within the group are observed, and tally the number of species within the particular group. Includes option to tally either different levels (area or point; column to be specified by the user). Output dataframe can used for subsequent data processing (e.g. filtered away from the input dataset observations).

Usage

check_taxongrps(
  observations,
  level,
  species = "species",
  genus = "genus",
  family = "family",
  area = "area",
  period = "period",
  point_id = "point_id"
)

Arguments

observations

Dataframe of species observations. It should include columns for species, genus, family, area, period, and point_id.

level

Specify whether to tally by area or point.

species

Column name of the species name recorded in observations. May include group-level records (genus or family).

genus

Column name of the genus name for recorded observations.

family

Column name of the family name for recorded observations.

area

Column name of the area of interest specified in observations. Defaults to area.

period

Column name of the sampling period specified in observations. Defaults to period.

point_id

Column name of the unique identifier for each point in observations. Defaults to point_id.

Value

Dataframe containing the taxon group names where all species within the group are observed. Includes columns for the period and area/point_id (depending on argument level), as well as the number (n) of species in the particular taxon group.

Examples


data(animal_observations)
check_taxongrps(observations = animal_observations, level = "area")
#> # A tibble: 0 × 4
#> # Groups:   area, period [0]
#> # … with 4 variables: area <chr>, period <dbl>, name <chr>, n <int>