From 884042c4aa75da7125b49f34571b9850d6f9fe3c Mon Sep 17 00:00:00 2001 From: Schultheis Date: Thu, 7 Jun 2018 10:06:15 +0200 Subject: [PATCH] download: save version info (R, ggplot, plotly) --- R/function.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/function.R b/R/function.R index 5066299..1b71fbe 100644 --- a/R/function.R +++ b/R/function.R @@ -1198,8 +1198,11 @@ download <- function(file, filename, plot, width, height, ppi = 72, save_plot = if (save_plot) { # create temp file name plot_object_file <- tempfile(pattern = "plot_object", fileext = ".RData") + ggplot2_version <- as.character(packageVersion("ggplot2")) + plotly_version <- as.character(packageVersion("plotly")) + r_version <- R.Version()$version.string - save(plot, file = plot_object_file) + save(plot, ggplot2_version, plotly_version, r_version, file = plot_object_file) files <- c(files, plot_object_file) }