Skip to content

Instantly share code, notes, and snippets.

@sckott
Created October 16, 2012 17:41
Show Gist options
  • Save sckott/3900791 to your computer and use it in GitHub Desktop.
Save sckott/3900791 to your computer and use it in GitHub Desktop.
Retrieve all taxa names or TSNs (taxonomic serial numbers) downstream in hierarchy from given TSN.
install.packages("devtools") # need devtools to use install_github()
require(devtools)
install_github("ritis", "ropensci") # need for the function searchbyscientificname below
require(ritis)
install_github("taxize_", "ropensci", ref="downstream_fix") # Installs packages in development directly from Github
library(taxize)
tsn1 <- searchbyscientificname("Osteichthyes") # get TSN for Osteichthyes (bony fish)
downstream2(tsn1$tsn, "Class") # get all Classes within Osteichthyes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment