library("ggplot2")
library("Rmisc")
myplots <- list()
x = seq(1,100,1)
y = seq(1,100,1)
for(i in 1:10) {
myplots[[i]] <- plot(x,y)
}
multiplot(plotlist = myplots, cols=2)
I receive the following error:
Error in unit(rep_len(1, nrow), "null") : 'x' and 'units' must have length > 0 In addition: Warning message: In matrix(seq(1, cols * ceiling(numPlots/cols)), ncol = cols, nrow = ceiling(numPlots/cols)) : data length exceeds size of matrix