tbl_sum_samdata {MiscMetabar} | R Documentation |
Summarize information from sample data in a table
Description
A wrapper for the gtsummary::tbl_summary()
function in the case of physeq
object.
Usage
tbl_sum_samdata(physeq, remove_col_unique_value = TRUE, ...)
Arguments
physeq |
(required): a |
remove_col_unique_value |
(logical, default TRUE) Do we remove informative columns (categorical column with one value per samples), e.g. samples names ? |
... |
Others arguments pass on to |
Details
This function is mainly a wrapper of the work of others.
Please make a reference to gtsummary::tbl_summary()
if you
use this function.
Value
A new phyloseq-class
object with a larger slot tax_table
Author(s)
Adrien Taudière
Examples
if (requireNamespace("gtsummary")) {
tbl_sum_samdata(data_fungi) %>%
gtsummary::as_kable()
summary_samdata <- tbl_sum_samdata(data_fungi,
include = c("Time", "Height"),
type = list(Time ~ "continuous2", Height ~ "categorical"),
statistic = list(Time ~ c("{median} ({p25}, {p75})", "{min}, {max}"))
)
}
data(enterotype)
if (requireNamespace("gtsummary")) {
summary_samdata <- tbl_sum_samdata(enterotype)
summary_samdata <- tbl_sum_samdata(enterotype, include = !contains("SampleId"))
}
[Package MiscMetabar version 0.9.1 Index]