{
require(magrittr)
### Data preparation ###
data("Two_group")
## Use taxonomy summary objects
phylum10 <- community_plot(
taxobj = Two_group,
taxlevel = "Phylum",
n = 10,
rmprefix = "p__"
)
phylum10$barplot # Check bar plot
phylum10$areaplot # Check area plot
phylum10$alluvialplot # Check alluvial plot
phylum10$Top10Phylum %>% head(10) # Check top taxa data frame
phylum10$Grouped_Top10Phylum %>% head(10) # Check grouped top taxa data frame
print(phylum10$filled_color) # Check mapping colors
# Double facet
data("Facet_group")
# Using palette by default
phylum10 <- community_plot(
taxobj = Facet_group,
taxlevel = "Phylum",
n = 10,
rmprefix = " p__"
)
phylum10$barplot
phylum10$areaplot
phylum10$alluvialplot
# Another example
genus20 <- community_plot(
taxobj = Facet_group,
taxlevel = "Genus",
n = 20,
palette = "Paired",
rmprefix = " g__"
)
genus20$alluvialplot
}
Run the code above in your browser using DataLab