I just updated R, R Studio, and a bunch of packages including ggplot2 and gridExtras on my Mac. Now gridExtras is failing in basic plotting with the error:
"only 'grobs' allowed in "gList""
Here's some code that should work but does not:
library(ggplot2)
p1 = qplot(1:10,rnorm(10))
p2 = qplot(1:10,rnorm(10))
library(gridExtra)
grid.arrange(p1, p2, ncol=2, main = "Main title")
This dumps out the following error:
Error in gList(list(grobs = list(list(x = 0.5, y = 0.5, width = 1, height = 1, :
only 'grobs' allowed in "gList"
In addition: Warning message:
In grob$wrapvp <- vp : Coercing LHS to a list
Any help is appreciated!
grid.arrange
doesn't have amain
parameter (according to my help at least). Your code works fine without that. – Chadburn