Taxaremover: Remove taxa from a list of taxlifestages

View source: R/Taxonomic_utilities.R

TaxaremoverR Documentation

Remove taxa from a list of taxlifestages

Description

Given 2 lists of character vectors and an ID corresponding to the name of an element in each list, this function will, for the named element, remove values in one character vector that correspond to values in the other and output a concatenated string of all remaining values.

Usage

Taxaremover(ID, Taxlifestage_list, Remove_taxa)

Arguments

ID

The quoted name of an element in both Taxlifestage_list and Remove_taxa

Taxlifestage_list

The list of character vectors of Taxlifestages from which elements will be removed.

Remove_taxa

The list of character vectors of Taxa names containing values to be removed from Taxlifestage_list.

Details

This function is designed to work on one ID at a time. To apply across multiple IDs, use the map or apply functions.

Value

A comma-separated string of remaining Taxlifestages from Taxlifestage_list[[ID]]

Author(s)

Sam Bashevkin

See Also

Zoopsynther, crosswalk

Examples

## Not run: 
Taxlifestage_list <- list(EMP = paste(crosswalk$EMP_Meso[!is.na(crosswalk$EMP_Meso)],
                          crosswalk$Lifestage[!is.na(crosswalk$EMP_Meso)]))
Remove_taxa <- list(EMP = crosswalk$EMP_Micro[!is.na(crosswalk$EMP_Micro)])
Meso_not_Micro <- Taxaremover("EMP", Taxlifestage_list, Remove_taxa)

## End(Not run)

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