我想使用函数序列提取一些绘图代码,如http://www.r-bloggers.com/magrittr-1-5/中所述。但是,它并没有起作用。
require(magrittr); require(ggplot2); require(dplyr)
plot_me <- . %>% (ggplot(aes(Sepal.Width, Sepal.Length)) + geom_point())
iris %>% plot_me
尝试这样做时,R会给出以下错误:
使用简单的管道进行相同操作可以很好地运行:错误:ggplot2不知道如何处理类uneval的数据
iris %>% ggplot(aes(Sepal.Width, Sepal.Length)) + geom_point()
我的功能序列/代码有什么问题吗?