R语言没有%-%函数解决方案

2019-08-03
#R

具体错误:

Error in gapminder %>% filter(country == “Malawi”) : 没有"%>%“这个函数 停止执行

解决方案:

install.packages("magrittr") # package installations are only needed the first time you use it
library(magrittr) # needs to be run every time you start R and want to use %>%

或者

install.packages("dplyr")    # alternative installation of the %>%
library(dplyr)    # alternatively, this also loads %>%

参考