| makeNewick | R Documentation | 
Create a Newick formatted tree from a data.frame of taxonomic assignments
makeNewick(
  taxa,
  naSub = "_",
  excludeTerminalNAs = FALSE,
  quote = NULL,
  terminator = ";"
)
taxa | 
 a matrix with a row for each leaf of the tree and a column for each taxonomic classification e.g. the output from getTaxonomy  | 
naSub | 
 a character string to substitute in place of NAs in the taxonomy  | 
excludeTerminalNAs | 
 If TRUE then do not output nodes downstream of the last named taxonomic level in a row  | 
quote | 
 If not NULL then wrap all entries with this character  | 
terminator | 
 If not NULL then add this character to the end of the tree  | 
a string giving a Newick formatted tree
getTaxonomy
taxa<-matrix(c('A','A','A','B','B','C','D','D','E','F','G','H'),nrow=3)
makeNewick(taxa)
taxa<-matrix(c('A','A','A','B',NA,'C','D','D',NA,'F','G',NA),nrow=3)
makeNewick(taxa)
makeNewick(taxa,excludeTerminalNAs=TRUE)
makeNewick(taxa,quote="'")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.