1
1
BenchmarkDotNetVersion <- " $BenchmarkDotNetVersion$ "
2
2
dir.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 " )
4
4
new.packages <- list.of.packages [! (list.of.packages %in% installed.packages()[," Package" ])]
5
5
if (length(new.packages )) install.packages(new.packages , lib = Sys.getenv(" R_LIBS_USER" ), repos = " https://cran.rstudio.com/" )
6
6
library(ggplot2 )
@@ -9,6 +9,7 @@ library(gdata)
9
9
library(tidyr )
10
10
library(grid )
11
11
library(gridExtra )
12
+ library(R.devices )
12
13
13
14
isEmpty <- function (val ){
14
15
is.null(val ) | val == " "
@@ -38,7 +39,8 @@ nicePlot <- function(p) grid.arrange(p, bottom = BenchmarkDotNetVersionGrob)
38
39
printNice <- function (p ) {} # print(nicePlot(p))
39
40
ggsaveNice <- function (fileName , p , ... ) {
40
41
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 ), ... ))
42
44
cat(" ------------------------------\n " )
43
45
}
44
46
0 commit comments