# Input taxonomic names
taxa <- c("Collomia grandiflora", "Lilium lankongense", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick',
method = "phylomatic", storedtree = "smith2011",
outformat = "newick", clean = "true")
plot(tree)
# Lots of names
taxa <- c("Collomia grandiflora", "Lilium lankongense", "Phlox diffusa",
"Iteadaphne caudata", "Nicotiana tomentosa", "Gagea sarmentosa")
tree <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick',
method = "phylomatic", storedtree = "smith2011",
outformat = "newick", clean = "true")
plot(tree)
# Output NeXML format
taxa <- c("Gonocarpus leptothecus", "Gonocarpus leptothecus", "Impatiens davidis")
out <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick', method = "phylomatic",
storedtree = "smith2011", outformat = "nexml", clean = "true")
library(RNeXML)
read.nexml(out, type="nexml", asText=TRUE)
Run the code above in your browser using DataLab