發表文章

R: eval & parse function

圖片
R:eval & parse function R:eval & parse function Peter Lin 2018/4/6 library(ggplot2) x=c("vs","cyl","carb","gear") for (i in x){print(ggplot(aes(x=disp,y=mpg),data=mtcars)+geom_point()+facet_grid(~eval(parse(text=i))))}