Fix inconsistent behavior of tempfile on windows
diff --git a/R/mini_plots.R b/R/mini_plots.R
index 5ce33b0..f34715f 100644
--- a/R/mini_plots.R
+++ b/R/mini_plots.R
@@ -63,7 +63,8 @@
}
if (is.null(file)) {
- file <- tempfile("hist", dir, paste0('.', file_type))
+ file <- file.path(dir, paste0(
+ "hist_", round(as.numeric(Sys.time()) * 1000), ".", file_type))
}
if (file_type == "svg") {
@@ -132,7 +133,8 @@
}
if (is.null(file)) {
- file <- tempfile("hist", dir, paste0('.', file_type))
+ file <- file.path(dir, paste0(
+ "hist_", round(as.numeric(Sys.time()) * 1000), ".", file_type))
}
if (file_type == "svg") {