r - Input must be grobs Erorr when using do.call() -
i trying create 4 parallel coordinate plots big figure. below toy data make reproducible has no particular meaning other mimicking real data of meaning.
library(ggally) library(gridextra) library(ggplot2) cnum=4 x = data.frame(a=2*runif(100)-1,b=2*runif(100)-1,c=2*runif(100)-1,d=2*runif(100)-1,e=2*runif(100)-1) plot_i = vector("list", length=cnum) (i in 1:4){ x = x + plot_i[[i]] = ggparcoord(x, columns=1:5, alphalines=0.5) do.call("grid.arrange", c(plot_i, ncol=1)) }
here, seems error occurs on first iteration of do.call part. error:
error in arrangegrob(..., as.table = as.table, clip = clip, main = main, : input must grobs!
i see well-searched error, although solution seems dependent on context. instance, here, user misused ncol (error grid.arrange:input must grobs) not seem situation. thank you...