if (FALSE) {
# Read a dataset of interest
dataset <- read_data("edi.193.5")
# plot ecocomDP formatted dataset
plot_taxa_abund(dataset)
# plot flattened ecocomDP dataset, log(x+1) transform abundances
plot_taxa_abund(
data = flatten_data(dataset),
trans = "log1p")
# facet by location color by taxon_rank, log 10 transform
plot_taxa_abund(
data = dataset,
facet_var = "location_id",
color_var = "taxon_rank",
trans = "log10")
# facet by location, minimum rel. abund = 0.05, log 10 transform
plot_taxa_abund(
data = dataset,
facet_var = "location_id",
min_relative_abundance = 0.05,
trans = "log1p")
# color by location, log 10 transform
plot_taxa_abund(
data = dataset,
color_var = "location_id",
trans = "log10")
# tidy syntax, flatten then filter data by date
dataset %>%
flatten_data() %>%
dplyr::filter(
lubridate::as_date(datetime) > "2003-07-01") %>%
plot_taxa_abund(
trans = "log1p",
min_relative_abundance = 0.01)
}
# Plot the example dataset
plot_taxa_abund(ants_L1)
Run the code above in your browser using DataLab