【发布时间】:2018-07-13 09:17:08
【问题描述】:
我一直在尝试使用 tidytext 包计算词频。
v <- "Everybody dance now! Give me the music Everybody dance now! Give me the music Everybody dance now! Everybody dance now! Yeah! Yeah! Yeah!"
v <- as.character(v)
v %>% count(words)
但我一直收到此错误: UseMethod("as.quoted") 中的错误: 没有适用于“函数”类对象的“as.quoted”方法
请帮忙!谢谢!
【问题讨论】:
-
我认为 tidytext 本身没有
count方法。 tidytext 可以帮助您将文档或字符串转换为数据框,其中包含您可以计算的单词。请参阅下面的答案。
标签: r string text-mining tidytext