Hi,
I ran the following code and at the end got the next error:
what might be the problem?
Thank you!
Lynne
`library(microbiome)
#plot_count_abundance
library(phyloseq)
library(ggplot2)
#check how many samples are there
total_samples <- phyloseq::nsamples(ps)
ps.pruned <- prune_taxa(taxa_sums(ps) >0, ps)
pseq.phylum <- aggregate_rare(ps, level="Phylum", detection = 1/100, prevalence = 50/100)
Remove the "p__" before the family namestaxa_names(pseq.phylum) <- gsub("p__", "", taxa_names(pseq.phylum) )
p.phylum <- plot_composition(ps.pruned,
sample.sort = NULL,
otu.sort = NULL,
x.label = "empo_3",
plot.type = "barplot",
verbose = FALSE) +
theme(axis.text.x = element_blank(),
axis.ticks = element_blank()) +
xlab("Bacteria composition")
p.phylum
`