Hello, I have a corpus named 'test', filled with character strings, and I'd like to remove the last character from each string ONLY if it is a vowel. The current code I'm working with is this:
test2 <- tm_map(test, content_transformer(function(x) gsub(x, pattern = "[aeyuio]+$", replacement = "")))
It doesn't seem to be doing it
Any ideas what I could change my code to to get it to work?