A wrapper for the gtsummary::tbl_summary()
function in the case of physeq
object.
Arguments
- physeq
(required): a
phyloseq-class
object obtained using thephyloseq
package.- remove_col_unique_value
(logical, default TRUE) Do we remove informative columns (categorical column with one value per samples), e.g. samples names ?
- ...
Other arguments pass on to
gtsummary::tbl_summary()
.
Value
A new phyloseq-class
object with a larger slot tax_table
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.
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}"))
)
}
# \donttest{
data(enterotype)
if (requireNamespace("gtsummary")) {
summary_samdata <- tbl_sum_samdata(enterotype)
summary_samdata <- tbl_sum_samdata(enterotype, include = !contains("SampleId"))
}
# }