I have an issue when knitting my Rmarkdown as initializing the tidyverse package to each core in my cluster it just prints all the packages it attaches. I have tried everything like suppressPackageStartupMessages() and adding quietly = TRUE and/or verbose = FALSE. Nothing works!
Below is a reproducible example (the more cores the messier it looks in the html).
knitr::opts_chunk$set(echo = TRUE)
library(parallel)
#Assign cores to a cluster.
cl <- makeCluster(detectCores())
#The cluster needs tidyverse
clusterEvalQ(cl,suppressPackageStartupMessages(library(tidyverse, quietly = TRUE, verbose = FALSE)))
Edit 1: I have also tried to add {r,warning=FALSE,message=FALSE} to my R chunk header.
Edit 2: Output for people that do not have tidyverse installed (with 2 cores initialized):
## [[1]]
## [1] "forcats" "stringr" "dplyr" "purrr" "readr" "tidyr"
## [7] "tibble" "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [13] "utils" "datasets" "methods" "base"
##
## [[2]]
## [1] "forcats" "stringr" "dplyr" "purrr" "readr" "tidyr"
## [7] "tibble" "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [13] "utils" "datasets" "methods" "base"