I have been trying to create functions that return a list of ggplot and am having various problems. Fundamentally however, I do not understand why this is TRUE
"data.frame" == class(c(qplot(1:10,rnorm(10)))[[1]])
when this is [TRUE,TRUE]
c('gg','ggplot') == class(qplot(1:10,rnorm(10)))
I havent seen any questions similar to this. I see various questions that are solved by things like
lapply(someList, function(x) {
#make ggplot, then use print(...) or whatever
})
So I am guessing there is something about passing ggplot objects out of functions or between environments or something. Thanks for any clues about the ggplot or R that I am missing.