library(kableExtra)
library(tidyverse)
library(magrittr)
ps_prune_sample <- phyloseq::subset_samples(ps_raw, phyloseq::sample_sums(ps_raw) >15000)
ps_prune_taxa <- phyloseq::prune_taxa(phyloseq::taxa_sums(ps_prune_sample) > 0, ps_prune_sample)
ps_core <- microbiome::core(ps_prune_taxa, detection = 0.01, prevalence = 0.01)
ps_core %>%
betatest(group = c("nationality", "bmi_group"), distance = "bray") %>%
set_colnames(c("Group", "Df", "SumsOfSqs", "MeanSqs", "FModel", "R2", "Pvalue")) %>%
kable(format = "html") %>%
kable_styling(bootstrap_options = "basic", full_width = F, position = "float_left") %>%
column_spec(7, bold = TRUE, color = "black", background = "#eeeeee")