R-将分隔字符串的列表转换为字符串
因此,我试图删除318591个字符串向量的停止字 通过这样做,我正在使用这个R-将分隔字符串的列表转换为字符串,r,R,因此,我试图删除318591个字符串向量的停止字 通过这样做,我正在使用这个 X<-lapply(articles_and_id[,2], function(x) { t <- unlist(strsplit(x, " ")) t[t %nin% stopWords] 所以我想把它放回一个数据帧,将它转换成以下形式: 1 new, relictual, highly, troglomorphic, species, tomoce
X<-lapply(articles_and_id[,2], function(x) {
t <- unlist(strsplit(x, " "))
t[t %nin% stopWords]
所以我想把它放回一个数据帧,将它转换成以下形式:
1 new, relictual, highly, troglomorphic, species, tomoceridae, collembola, deep, croatian, cave
我正在使用:
articles_and_id[,2] <- lapply(X,toString)
articles\u和\u id[,2]您可以使用:
articles_and_id[,2] <- sapply(X,paste, collapse=" ")
articles_和_id[,2]
articles_and_id[,2] <- sapply(X,paste, collapse=" ")