save_plot_list: Save a list of plots to the current working directory

View source: R/save_plot_list.R

save_plot_listR Documentation

Save a list of plots to the current working directory

Description

Set your working directory to the folder you want to save your plots to with setwd("~/foo/bar") then call the function on your list of plots.

Usage

save_plot_list(
  plot_list,
  dir = NULL,
  plot_type = "bigram",
  dpi = 700,
  width = 9,
  height = 6,
  units = c("in", "cm", "mm", "px")
)

Arguments

plot_list

Should be a named list of plots

dir

the directory to save plots in (defaults to current working directory)

plot_type

For saving prefix that gets pasted with name and .png = e.g. "bigram_microsoft_topic_1.png"

dpi

Resolution of saved image - higher number = higher quality

width

Plot width in specified units

height

Plot width in specified units

units

the appropriate unit of measurement for plot dimensions

Value

does not return anything - saves plots to working directory

Examples

## Not run: 
df <- ParseR::sprinklr_export %>% janitor::clean_names()
bigrams_list <- df %>% group_split(social_network) %>% map(make_bigram_viz, message, .progress = TRUE)
names(bigrams_list) <- c("1", "2", "3")
dir.create("test_dir")
save_plot_lists(plot_list = bigrams_list, dir = "test_dir")

## End(Not run)

jpcompartir/JPackage documentation built on March 20, 2023, 4 a.m.