Hello, thanks for responding.
I tried the code you wrote and indeed, it makes a pdf but with only the last one plot...
You say there is no way to store standard plots in a variable here? Would it be possible with a ggplot ?
( I found e.g. this:
library(tidyverse)
oo <- function(x) {
ggplot() + geom_qq(aes(sample = x)) + geom_qq_line()
}
ploty <- lapply(mtcars,oo)
pdf("sploty.pdf")
ploty
dev.off()
which seems to work alright, except +geom_qq_line() does not show the line)
PS. why the function is weird?
I tried to write it inline in lapply, it worked with a semicolon and looked less