R/venn_diagram_plot.R
venn_diagram_plot.RdThis function creates a Venn diagram using either the ggVennDiagram or ggenn package
based on the user's preference. It includes additional customization options like
minimum prevalence filtering and custom group color scales (manual).
venn_diagram_plot(
table,
metadata,
merge_by = NULL,
selected_samples = NULL,
min_prevalence = 0,
title = NULL,
method = "ggvenn",
group_colors = NULL
)A data frame containing taxonomic abundance data with a column named taxonomy and subsequent columns as sample IDs.
A data frame containing metadata with a column named SAMPLEID that matches the sample columns in table.
A character string specifying the metadata column by which to group and merge samples. Default is Tratamiento.
Optional character vector specifying a subset of sample IDs to include in the analysis.
Optional numeric value (0-1) to filter taxa based on minimum prevalence across groups.
Optional character string for the title of the plot.
Character string: ggVennDiagram (default) or ggvenn, specifying the package to use for Venn diagram generation.
Optional vector of colors for the groups. If NULL, a default distiller scale with Set3 palette will be used.
A ggplot object or other plot depending on the method.
venn_diagram_plot(table= table_taxa,
metadata=metadata,
merge_by = "ID.CAM",
min_prevalence = 0,
denom = "all",
group_colors = c("blue", "yellow"),
method = "ggvenn")
#> Error in venn_diagram_plot(table = table_taxa, metadata = metadata, merge_by = "ID.CAM", min_prevalence = 0, denom = "all", group_colors = c("blue", "yellow"), method = "ggvenn"): unused argument (denom = "all")