输入数据:
df <- data.frame(id = c(1,1,2,3,1), text = c("hi","merge","another","no","here"), stock = c("google","yahoo","google","amazon","google"))
如果id和stock相同,如何合并text column的行文本。
示例输出
df <- data.frame(id = c(1,1,2,3), text = c("hi here","merge","another","no") stock = c("google","yahoo","google","amazon"))