Row<-c(1,2,3,4,5)
Content<-c("I love cheese", "whre is the fish", "Final Countdow", "show me your s", "where is what")
Data<-cbind(Row, Content)
View(Data)
我想创建一个函数来告诉我每行有多少单词是错误的。
一个中间步骤是让它看起来像这样:
Row<-c(1,2,3,4,5)
Content<-c("I love cheese", "whre is the fs", "Final Countdow", "show me your s", "where is what")
MisspelledWords<-c(NA, "whre, fs", "Countdow","s",NA)
Data<-cbind(Row, Content,MisspelledWords)
我知道我必须使用 aspell,但是我在仅对行执行 aspell 而不总是直接在整个文件上执行 aspell 时遇到问题,最后我想计算每行有多少单词是错误的为此我将采用以下代码:计算R中字符串中的单词数?