R 找不到函数“;非最新的“代币”;
我试图使用tokenizers包将列拆分为令牌,但我一直收到一个错误:找不到函数“unnest_tokens”。我正在使用R3.5.3,已经安装并重新安装了dplyr、tidytext、tidyverse、tokenizers、tidyr,但仍然收到错误 我也退出并重新启动了R和RStudioR 找不到函数“;非最新的“代币”;,r,tidytext,unnest,R,Tidytext,Unnest,我试图使用tokenizers包将列拆分为令牌,但我一直收到一个错误:找不到函数“unnest_tokens”。我正在使用R3.5.3,已经安装并重新安装了dplyr、tidytext、tidyverse、tokenizers、tidyr,但仍然收到错误 我也退出并重新启动了R和RStudio comments_tidy <- comments %>% unnest_tokens(word, txt) %>% #Break the comments into individ
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
注释\u%
unnest_标记(word,txt)%>%#将注释分解为单个单词
筛选(!单词%in%不需要的单词)%>%#删除不需要的单词
反连接(停止字)#由tidytext包提供的数据
我收到以下消息:
unnest_标记(、word、txt)中出错:找不到函数“unnest_令牌”
如注释中所述,您可能希望使用
library(x)
语句扩展代码。此外,请确保安装了所有软件包及其依赖项。下面的代码段将查找给定的包(在本例中为dplyr
),并在需要时安装它
if ("dplyr" %in% installed.packages()[, "Package"]){
cat("'dplyr' is installed.")
} else {
install.packages("dplyr",dependencies=T)
}
library(dplyr)
命令
installed.packages()[,“Package”]?
为您提供了所有已安装软件包的列表,这是调试所有类型的函数foo not found
错误的好方法。您是否调用了库(x)
<代码>库(y)?是的,我为描述中提到的包调用了每个库。请尽量明确:tidytext::unest_tokens()
谢谢!显式函数也帮助了我。