简体   繁体   English

“ sep”不是从“ namespace:dplyr”导出的对象

[英]'sep' is not an exported object from 'namespace:dplyr'

obtaining n-grams following this book on tydy-text: http://tidytextmining.com/ngrams.html 在有关tydy-text的本书之后获取n-gram: http ://tidytextmining.com/ngrams.html

The code: 编码:

library(tidyr)

bigrams_separated <- austen_bigrams %>%
  separate(bigram, c("word1", "word2"), sep = " ")

bigrams_filtered <- bigrams_separated %>%
  filter(!word1 %in% stop_words$word) %>%
  filter(!word2 %in% stop_words$word)

# new bigram counts:
bigram_counts <- bigrams_filtered %>% 
  count(word1, word2, sort = TRUE)

I get an error: 我收到一个错误:

Warning: Error in : 'sep' is not an exported object from 'namespace:dplyr'

Try this code not loading tidyr: 试试这个代码不加载tidyr:

bigrams_separated <- austen_bigrams %>%
mutate(word1 = sub(" .*", "", bigram),
       word2 = sub(".* ", "", bigram))

我遇到了相同的错误,似乎可以通过指定tidyr :: separate()来解决

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 dplyr 时出错:object 'data_frame' 不是由 'namespace:vctrs' 导出的 - Error using dplyr : object ‘data_frame’ is not exported by 'namespace:vctrs' 错误:package 或“tidyverse”的命名空间加载失败:object “relocate”未由“namespace:dplyr”导出 - Error: package or namespace load failed for ‘tidyverse’: object ‘relocate’ is not exported by 'namespace:dplyr' 错误:“随机播放”不是从“名称空间:merTools”导出的对象 - Error: 'shuffle' is not an exported object from 'namespace:merTools' 不是从“命名空间:ggplot2”导出的 object 吗? - Is not an exported object from 'namespace:ggplot2'? Shinydashboard:&#39;restoreInput&#39;不是&#39;namespace:sh​​iny&#39;的导出对象 - Shinydashboard: 'restoreInput' is not an exported object from 'namespace:shiny' 如何修复R中的“错误:&#39;名称空间:dplyr&#39;未导出对象&#39;as_tibble&#39;错误:包&#39;BLANK&#39;的延迟加载失败” - How to fix “Error : object ‘as_tibble’ is not exported by 'namespace:dplyr' ERROR: lazy loading failed for package ‘BLANK’” in R &#39;MASS::predict.lda&#39; 不是从 &#39;namespace:MASS&#39; 导出的对象 - 'MASS::predict.lda' is not an exported object from 'namespace:MASS' “数据”不是从“命名空间:my_package”导出的 object - 'data' is not an exported object from 'namespace:my_package' “predict.pca”不是从“namespace:mdatools”导出的 object - 'predict.pca' is not an exported object from 'namespace:mdatools' 错误:“calculate_intervals”不是从“namespace:forecastML”导出的 object - Error : 'calculate_intervals' is not an exported object from 'namespace:forecastML'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM