# Input taxonomic names
taxa <- c("Poa annua", "Phlox diffusa", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST')
plot(tree, no.margin=TRUE)
# Genus names
taxa <- c("Poa", "Phlox", "Helianthus")
tree <- phylomatic_tree(taxa=taxa, storedtree='R20120829', get='POST')
plot(tree, no.margin=TRUE)
# Lots of names
taxa <- c("Poa annua", "Collomia grandiflora", "Lilium lankongense", "Phlox diffusa",
"Iteadaphne caudata", "Gagea sarmentosa", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST')
plot(tree, no.margin=TRUE)
# Output NeXML format
taxa <- c("Gonocarpus leptothecus", "Gonocarpus leptothecus", "Lilium lankongense")
out <- phylomatic_tree(taxa=taxa, get = 'POST', outformat = "nexml")
cat(out)
# Lots of names, note that when you have enough names (number depends on length of individual
# names, so there's no per se rule), you will get an error when using \code{get='GET'},
# when that happens use \code{get='POST'}
spp <- names_list("species", 200)
# (out <- phylomatic_tree(taxa = spp, get = "GET"))
(out <- phylomatic_tree(taxa = spp, get = "POST"))
plot(out)
# Pass in a tree from a URL on the web
spp <- c('Abies amabilis','Abies balsamea','Abies bracteata','Abies concolor','Abies fraseri',
'Abies grandis','Abies lasiocarpa','Abies magnifica','Abies procera','Acacia berlandieri')
spp <- c('Pinus koraiensis', 'Pinus sibirica', 'Pinus albicaulis', 'Pinus lambertiana',
'Pinus bungeana', 'Pinus strobus', 'Pinus_cembra')
url <- "http://datadryad.org/bitstream/handle/10255/dryad.8791/final_tree.tre?sequence=1"
phylomatic_tree(taxa=spp, treeuri=url)
# If there gymnosperms in your taxa list, use db of itis or ncbi
taxa <- c('Abies amabilis','Abies balsamea','Abies grandis','Abies lasiocarpa',
'Abies magnifica','Abies procera','Acacia berlandieri','Poa annua')
(tree1 <- phylomatic_tree(taxa=taxa, db="ncbi"))
plot(tree1)
Run the code above in your browser using DataLab