R/save_this_plot.R

Defines functions save_this_plot

Documented in save_this_plot

#' Save plot
#'
#' @param plot plot to save
#' @param output_path path where to save the plot
#' @param name name of the plot
#' @param width width of plot
#' @param height height of plot
#'
#' @import ggplot2
#' @export

save_this_plot <- function(plot, output_path, name, width = 5, height=5){
  ggsave(plot = plot,
         filename = paste(output_path, "/", name, ".png", sep=""),
         height = height,
         width = width)
}
MelodyPremaillon/valwoe documentation built on April 16, 2022, 12:46 a.m.