Re: [R] Need content_transformer() called by tm_map() to change non-letters to spaces

2015-04-24 Thread Jeff Newmiller
Regex [^a-zA-Z] reads as not a letter. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

[R] Need content_transformer() called by tm_map() to change non-letters to spaces

2015-04-23 Thread Mike
Hello, In the following code, any characters matching  /|@| \\|) will be changed to a space. library(tm) toSpace - content_transformer(function(x, pattern) gsub(pattern, , x)) docs - tm_map(docs, toSpace, /|@| \\|) What code would transform all non-letters to a space?  (What goes where the