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

How can I find compound words, removing spaces between them and replace them in my corpus?

If all your compound terms are separated only by blanks, you can use gsub: > x = c(“hello World”, “good Morning”, “good Night”) > y = gsub(pattern = ” “, replacement = “”, x = x) > print(y) [1] “helloWorld” “goodMorning” “goodNight” You can always add more patterns to pattern argument. Read more about regular … Read more