[英]'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.