R/add.tax.DA.R

Defines functions addTax

addTax <- function(data, res){
  
  loadNamespace("phyloseq")
  
  if(!is.null(phyloseq::tax_table(data, errorIfNULL = FALSE))){
    tax <- unclass(phyloseq::tax_table(data))
    res <- merge(res, tax, by.x = "Feature", by.y = "row.names")
    rownames(res) <- NULL
  } 
  
  return(res)

}
Russel88/DAtest documentation built on March 24, 2022, 3:50 p.m.