【发布时间】:2020-10-12 11:28:53
【问题描述】:
我有两个数据集,Review Data & Topic Data
我的审核数据
的Dput代码structure(list(Review = structure(2:1, .Label = c("Canteen Food could be improved",
"Sports and physical exercise need to be given importance"), class = "factor")), class = "data.frame", row.names = c(NA,
-2L))
我的主题数据
的Dput代码structure(list(word = structure(2:1, .Label = c("canteen food",
"sports and physical"), class = "factor"), Topic = structure(2:1, .Label = c("Canteen",
"Sports "), class = "factor")), class = "data.frame", row.names = c(NA,
-2L))
我的 Desired Output 的输出,我想查找出现在 Topic Data 中的单词并将其映射到 Review Data
structure(list(Review = structure(2:1, .Label = c("Canteen Food could be improved",
"Sports and physical exercise need to be given importance"), class = "factor"),
Topic = structure(2:1, .Label = c("Canteen", "Sports "), class = "factor")), class = "data.frame", row.names = c(NA,
-2L))
【问题讨论】:
-
您应该共享可重现的数据。您可以使用
dput函数来帮助共享您的数据集。 -
嗨@Suhas U - 如果您以人们可以复制粘贴到他们的R会话中的格式提供数据,那么您更有可能在这里获得帮助 - 例如,看看
dput。 -
嘿@DanielO,感谢您的建议,我刚刚更新了我的代码!
标签: r dplyr text-mining tm tidytext