View source: R/Taxonomic_utilities.R
Taxaremover | R Documentation |
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.
Taxaremover(ID, Taxlifestage_list, Remove_taxa)
ID |
The quoted name of an element in both |
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 |
This function is designed to work on one ID at a time. To apply across multiple IDs, use the map or apply functions.
A comma-separated string of remaining Taxlifestages from Taxlifestage_list[[ID]]
Sam Bashevkin
Zoopsynther
, crosswalk
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.