Replace OTU identifier names
Replace OTU identifier names
taxa_names(x) <- value ## S4 replacement method for signature 'ANY,ANY' taxa_names(x) <- value ## S4 replacement method for signature 'ANY,character' taxa_names(x) <- value ## S4 replacement method for signature 'otu_table,character' taxa_names(x) <- value ## S4 replacement method for signature 'taxonomyTable,character' taxa_names(x) <- value ## S4 replacement method for signature 'phylo,character' taxa_names(x) <- value ## S4 replacement method for signature 'XStringSet,character' taxa_names(x) <- value ## S4 replacement method for signature 'phyloseq,character' taxa_names(x) <- value
x |
(Required). An object defined by the |
value |
(Required). A character vector
to replace the current |
data("esophagus") taxa_names(esophagus) # plot_tree(esophagus, label.tips="taxa_names", ladderize="left") taxa_names(esophagus) <- paste("OTU-", taxa_names(esophagus), sep="") taxa_names(esophagus) # plot_tree(esophagus, label.tips="taxa_names", ladderize="left") ## non-characters are first coerced to characters. taxa_names(esophagus) <- 1:ntaxa(esophagus) taxa_names(esophagus) # plot_tree(esophagus, label.tips="taxa_names", ladderize="left") ## Cannot assign non-unique or differently-lengthed name vectors. Error. # taxa_names(esophagus) <- sample(c(TRUE, FALSE), ntaxa(esophagus), TRUE) # taxa_names(esophagus) <- sample(taxa_names(esophagus), ntaxa(esophagus)-5, FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.