This is the code for how I have been separating out the top 10 orders in the data set to graph relative abundance. How could I include the top 10 orders + an 11th group called others with the remaining data to have my stacked bars fill up to 100%?
order.sum = tapply(taxa_sums(relabun), tax_table(relabun)[, "Order"], sum, na.rm=TRUE)
top10orders = names(sort(order.sum, TRUE))[1:10]
ps2 = prune_taxa((tax_table(relabun)[, "Order"] %in% top10orders), relabun)
ps_top10orders <- tax_glom(ps2,taxrank = "Order")
ps_top10orders<-transform_sample_counts(ps_top10orders,function(x) x / sum(x))
ps_top10orders<-psmelt(ps_top10orders)
ps_top10orders<-arrange(ps_top10orders,Order)