Create a new visualization collection
create_viz.RdInitializes an empty collection for building up multiple visualizations using the piping workflow. Optionally accepts custom display labels for tab groups and default parameters that apply to all visualizations.
Examples
if (FALSE) { # \dontrun{
# Create viz collection with custom group labels
vizzes <- create_viz(tabgroup_labels = c("demo" = "Demographics",
"pol" = "Political Views"))
# Create viz collection with shared defaults
vizzes <- create_viz(
type = "stackedbars",
stacked_type = "percent",
color_palette = c("#d7191c", "#fdae61", "#2b83ba"),
horizontal = TRUE,
x_label = ""
) %>%
add_viz(title = "Wave 1", filter = ~ wave == 1) %>% # Uses defaults
add_viz(title = "Wave 2", filter = ~ wave == 2, horizontal = FALSE) # Overrides horizontal
} # }