4
#' Retrieve names of all species/otus otus (operational taxonomic units) included in the nexml
5
#' @aliases get_taxa get_otu
6
#' @param nexml a nexml object
7
#' @return the list of taxa
8
#' @export get_taxa get_otu
10
#' comp_analysis <- system.file("examples", "comp_analysis.xml", package="RNeXML")
11
#' nex <- nexml_read(comp_analysis)
13
#' @seealso \code{\link{get_item}}
14
get_taxa <- function(nexml){
15
get_level(nexml, "otus/otu")
21
#' Retrieve names of all species/otus otus (operational taxonomic units) included in the nexml
22
#' @aliases get_taxa_list get_otus_list
23
#' @param nexml a nexml object
24
#' @return the list of taxa
25
#' @export get_taxa_list get_otus_list
26
#' @seealso \code{\link{get_item}}
29
out <- lapply(nexml@otus, function(otus){
30
out <- sapply(otus@otu, function(otu) otu@label)
31
names(out) <- name_by_id(otus@otu)
34
names(out) <- name_by_id(nexml@otus)
37
get_otus_list <- get_taxa_list