stemCompletion is not working

I received the same error when using tm v0.6. I suspect this occurs because stemCompletion is not in the default transformations for this version of the tm package: > getTransformations function () c(“removeNumbers”, “removePunctuation”, “removeWords”, “stemDocument”, “stripWhitespace”) <environment: namespace:tm> Now, the tolower function has the same problem, but can be made operational by using the … Read more

How to flatten a list of lists?

I expect that unlist(foolist) will help you. It has an option recursive which is TRUE by default. So unlist(foolist, recursive = FALSE) will return the list of the documents, and then you can combine them by: do.call(c, unlist(foolist, recursive=FALSE)) do.call just applies the function c to the elements of the obtained list

R-Project no applicable method for ‘meta’ applied to an object of class “character”

The latest version of tm (0.60) made it so you can’t use functions with tm_map that operate on simple character values any more. So the problem is your tolower step since that isn’t a “canonical” transformation (See getTransformations()). Just replace it with corpus <- tm_map(corpus, content_transformer(tolower)) The content_transformer function wrapper will convert everything to the … Read more