pop | R Documentation |
That is, drop them
pop(.data, ...)
.data |
Input, object of class taxon |
... |
Further unnamed args, see examples |
For taxon
inputs gives back a taxon
object. For taxa
inputs
gives back a taxa
object. For taxondf
inputs, gives back a taxondf
object.
# operating on `taxon` objects out <- make_taxon(genus="Poa", epithet="annua", authority="L.", family='Poaceae', clazz='Poales', kingdom='Plantae', variety='annua') ## single taxonomic group out %>% pop(family) out %>% pop(genus) out %>% pop(species) ## many taxonomic groups out %>% pop(family, genus, species) # operating on taxonomic data.frames df <- data.frame(class=c('Magnoliopsida','Magnoliopsida','Magnoliopsida', 'Magnoliopsida','Magnoliopsida','Magnoliopsida'), order=c('Asterales','Asterales','Fagales','Poales','Poales','Poales'), family=c('Asteraceae','Asteraceae','Fagaceae','Poaceae','Poaceae','Poaceae'), genus=c('Helianthus','Helianthus','Quercus','Poa','Festuca','Holodiscus'), stringsAsFactors = FALSE) (df2 <- taxon_df(df)) ## pop out a single taxonomic group df2 %>% pop(order) df2 %>% pop(family) df2 %>% pop(genus) ## pop out many taxonomic groups df2 %>% pop(order, family) df2 %>% pop(order, genus) # From taxa object df2 %>% scatter %>% pop(family) df2 %>% scatter %>% pop(family, species) df2 %>% scatter %>% pop(family, species, genus)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.