【发布时间】:2019-09-09 23:29:48
【问题描述】:
我正在尝试使用 tokenizers 包将一列拆分为标记,但我一直收到错误消息:找不到函数“unnest_tokens”。我正在使用 R 3.5.3 并已安装并重新安装了 dplyr、tidytext、tidyverse、tokenizers、tidyr,但仍然收到错误消息。
我也退出并重新启动了 R 和 RStudio。
comments_tidy <- comments %>%
unnest_tokens(word, txt) %>% #Break the comments into individual words
filter(!word %in% undesirable_words) %>% #Remove undesirables
anti_join(stop_words) #Data provided by the tidytext package
我收到以下信息:
unnest_tokens(., word, txt) 中的错误:
找不到函数“unnest_tokens”
【问题讨论】:
-
你打电话给
library(x);library(y)了吗? -
是的,我为描述中提到的包调用了每个库。
-
尝试明确:
tidytext::unnest_tokens() -
谢谢!显式函数也帮助了我。