Commontaxer: Detect common taxonomic names across all source datasets

View source: R/Taxonomic_utilities.R

CommontaxerR Documentation

Detect common taxonomic names across all source datasets

Description

Calculates taxa by life stage combos present in all source datasets

Usage

Commontaxer(Source_taxa_key, Taxa_level, Size_class)

Arguments

Source_taxa_key

A dataframe with columns named Source, Lifestage, SizeClass, and the value provided to the parameter Taxa_level. This dataframe should list all Taxa_level by Lifestage combinations present for each source dataset. You can provide it with the output of SourceTaxaKeyer.

Taxa_level

Taxonomic level you would like to perform this calculation for. E.g., if you wish to determine all Genus x lifestage combinations present in all datasets, provide Taxa_level = "Genus". The value provided here must be the name of a column in the dataset provided to Source_taxa_key.

Size_class

The size class(es) you would like this function to consider. You should generally only supply 1 size class.

Details

This function is designed to work on just one size class. To apply to multiple size classes, use map or apply functions to apply across size classes.

Value

A tibble with a column for Taxa_level and another for Lifestage representing all combinations of these values present in all source datasets.

Author(s)

Sam Bashevkin

See Also

Zoopsynther, crosswalk, SourceTaxaKeyer

Examples

## Not run: 
library(rlang)
library(purrr)
SourceTaxaKey <- SourceTaxaKeyer(zoopComb, crosswalk)
Size_classes <- set_names(c("Micro", "Meso", "Macro"))
Commontax <- map(Size_classes, ~ Commontaxer(SourceTaxaKey, "Taxname", .))

## End(Not run)

InteragencyEcologicalProgram/zooper documentation built on Feb. 6, 2025, 9:01 a.m.