我的问题是我如何能够为do.call函数添加更多参数.例如,我想绘制多面grid图grid.arrange,如何添加更多参数,例如ncol=3和main="main title"命令do.call(grid.arrange,plots)?
考虑这个情节清单,
library(ggplot2)
library(gridExtra)
pl = replicate(5, qplot(1,1), simplify = FALSE)
Run Code Online (Sandbox Code Playgroud)
你可以将它与要传递给的选项列表结合起来do.call,
do.call(grid.arrange, c(pl, list(ncol=5, main="title")))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1118 次 |
| 最近记录: |