jackStinger jackStinger - 1 year ago 174
R Question

Error converting text to lowercase with tm_map(..., tolower)

I tried using the

. It gave the following error. How can I get around this?

byword<-tm_map(byword, tolower)

Error in UseMethod("tm_map", x) :
no applicable method for 'tm_map' applied to an object of class "character"

Answer Source

Use the base R function tolower():

tolower(c("THE quick BROWN fox"))
# [1] "the quick brown fox"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download