11BenchmarkDotNetVersion <- " $BenchmarkDotNetVersion$ "
22dir.create(Sys.getenv(" R_LIBS_USER" ), recursive = TRUE , showWarnings = FALSE )
3- list.of.packages <- c(" ggplot2" , " dplyr" , " gdata" , " tidyr" , " grid" , " gridExtra" , " Rcpp" )
3+ list.of.packages <- c(" ggplot2" , " dplyr" , " gdata" , " tidyr" , " grid" , " gridExtra" , " Rcpp" , " R.devices " )
44new.packages <- list.of.packages [! (list.of.packages %in% installed.packages()[," Package" ])]
55if (length(new.packages )) install.packages(new.packages , lib = Sys.getenv(" R_LIBS_USER" ), repos = " https://cran.rstudio.com/" )
66library(ggplot2 )
@@ -9,6 +9,7 @@ library(gdata)
99library(tidyr )
1010library(grid )
1111library(gridExtra )
12+ library(R.devices )
1213
1314isEmpty <- function (val ){
1415 is.null(val ) | val == " "
@@ -38,7 +39,8 @@ nicePlot <- function(p) grid.arrange(p, bottom = BenchmarkDotNetVersionGrob)
3839printNice <- function (p ) {} # print(nicePlot(p))
3940ggsaveNice <- function (fileName , p , ... ) {
4041 cat(paste0(" *** Plot: " , fileName , " ***\n " ))
41- ggsave(fileName , plot = nicePlot(p ), ... )
42+ # See https://stackoverflow.com/a/51655831/184842
43+ suppressGraphics(ggsave(fileName , plot = nicePlot(p ), ... ))
4244 cat(" ------------------------------\n " )
4345}
4446
0 commit comments