I am using future_map to create several plots where I iterate through a list of variables and output/save a png file per variable to a folder. So there is no output that needs to be shown in the console or the "plot" pane.
The plotting part of the function:
ggplot(aes(sample = value,
color = key)) +
stat_qq(alpha = 0.8, size = 0.5) +
theme_light() +
theme(legend.position = "none") +
stat_qq_line() +
facet_wrap(~key,
ncol = 4) +
ggtitle(.var) +
ggsave(filename = here::here(paste0(.path,
.var,
".png")),
units = "cm",
width = 25,
height = 10)}
How I map the function:
plan(multiprocess(workers = 10))
future_map(names_list,
~check_dists(df_lips_imputed, .x, "doc/distributions/testing2/"),
verbose = FALSE)
However, after all files are created, I can see they are in the folder, this is slowly printed (takes a while, ~1k iterations):
[[1]]
[[2]]
[[3]]
...
Does anyone know how to suppress this output?
Many thanks!