pr2_build_taxonomy: Buikd taxonomy table (wide format) from taxon table (long...

Description Usage Arguments Value Note Examples

Description

This constructs a taxonomy table from a taxon table

Usage

1
pr2_build_taxonomy(pr2_taxons, pr2.env)

Arguments

pr2_taxons

dataframe - should contain at least three columns taxon_id, taxon_name, taxon_level, parent_id

pr2.env

list containing taxo_levels

Value

Data frame pr2_taxonomy with 9 columns

Note

The input data frame does not need to be the whole pr2 taxons, can be taxo extracted from an Excel file.

Programming note: This function uses the following trick for mutating the colums with the taxo_level string rank_name = sym(pr2.env$taxo_levelsi) mutate (!! rank_name := taxon_name)

Examples

1
pr2_taxo <- pr2_buil_taxonomy(pr2_taxons, pr2.env)

vaulot/dvutils documentation built on Nov. 20, 2021, 11:01 a.m.