i'm new to R.
I'm trying to boxplot the data (df, list) in each sub-list using lapply
.
I have written this function:
group.box <- function(x) {
lapply(X = x, FUN = boxplot)
}
Running it on the list that contains 6 sub-lists gives me 6 individual boxplot graph (6 separated graphs) and this text:
$sublist1
NULL
$sublist2
NULL
$sublist3
NULL
...
I tried to combine these graphs into one picture with 6 graphs:
par(mfrow=c(2,3))
group.box(data)
dev.off()
But then I only get the text (as displayed above) with no graphs. I thought maybe I should just export these 6 graphs into one pdf file.
Thank you!