taxon_df: Taxon data.frame

View source: R/taxon_df.R

taxon_dfR Documentation

Taxon data.frame

Description

Taxon data.frame

Usage

taxon_df(x)

Arguments

x

A data.frame of taxa

Examples

# subset data.frame using taxonomy
df <- data.frame(family=c('Asteraceae','Asteraceae','Asteraceae','Poaceae','Poaceae','Poaceae'),
                 tribe=c('Helianthi','Helianthi','Helianthi','Poaeae','Festuci','Poaeae'),
                 genus=c('Helianthus','Helianthus','Madia','Poa','Festuca','Holodiscus'),
                 stringsAsFactors = FALSE)
df2 <- taxon_df(df)
df2 %>% pick(family)
df2 %>% pick(genus, tribe)

ropensci/binomen documentation built on May 18, 2022, 9:47 a.m.