itis_reclassify: Reclassify ITIS species based off a list of higher taxonomic...

Description Usage Arguments Value Examples

View source: R/FishEconProdOutput.R

Description

Reclassify ITIS species based off a list of higher taxonomic groupings

Usage

1
itis_reclassify(tsn, categories, uncategorized_name = "Uncategorized")

Arguments

tsn

A vector of Taxonomic Serial Numbers to be evaluated.

categories

A list of the categories and associated TSN values. within a list of a category, a minus (-) in front of a number is short hand to remove organisms within that tsn's taxonomy from being listed in a category. See the example for an instance where that makes sense.

uncategorized_name

A string of what to call the missing value.

Value

df_out, tsn_indata

Examples

1
2
3
4
5
6
7
8
9
itis_reclassify(tsn = c(83677, # subphylum Crustacea; shellfish
                        172746, # Scophthalmus aquosus; finfish
                        173747, # class Reptilia; uncategorized as part of tetrapoda
                        98678), # Cancer borealis; shellfish
                categories = list('Finfish' = c(914179, #  Infraphylum	Gnathostomata
                                               -914181), # Tetrapoda; - = do NOT include
                                  "Shellfish" = c(82696, # Phylum	Arthropoda
                                                  69458)), # Phylum	Mollusca
                uncategorized_name = "uncategorized")

EmilyMarkowitz-NOAA/FishEconProdOutput documentation built on Aug. 30, 2021, 6:49 p.m.