简体   繁体   中英

cannot knit in r due to "Error: could not find function "%>%" "

every time I knit in R with the code below,

dataset_select %>% 
  group_by(V___DXONSPREPORT) %>%
  summarise(cnt = n()) %>% 
  arrange(desc(cnt)) 

the same message "Error: could not find function "%>%" pops up. I have loaded the librarys dplyr and magrittr. Thanks in advance.

You can use install.packages('magrittr') to download the package into R. Then use library(magrittr) to use the package that you downloaded. There are also several other packages that use the pipe function %>% such as stingr and tidyr.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM