Skip to content
Prev 256535 / 398506 Next

regular expression question

Hi Erin,

Please read ?grep.  It is clearly not the function you want (neither
is strsplit() either really).  This does what you want and you can
modify for upper/lower case if you need it.  Also note that regular
expressions exist separate from R, so while ":" may have seemed
natural to select a range in R, it has a very different function in
regexp.

gsub("[^A-Za-z]", "", names(funky))

Best regards,

Josh
On Mon, Apr 11, 2011 at 10:49 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote: