是否可以有效地为ggarrange
中的重复代码编写代码?我必须从z1
一直到z16
一直输入,所以当前的代码看起来很丑陋且很耗时。
ggarrange(z1,z2,z3,z4,z5,z6,z7,z8,z9,z10,z11,z12,z13,z14,z15,z16,nrow = 4,ncol = 4,labels = c(1:16))
我尝试过:
combined = noquote(paste0("z",1:16))
ggarrange(combined,labels = c(1:16))
Warning message:
In as_grob.default(plot) :
Cannot convert object of class noquote into a grob.