Skip to content
Prev 247476 / 398503 Next

a remove question

On Sun, Jan 16, 2011 at 1:08 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
there is no "pattern" argument in rm(), the only reason trying to use
it did not fail is that it has the ... argument to allow many objects
to be passed that you would like removed.
I do not believe  '*' works in regular expressions as I suspect you
are trying to use it.  See ?regexp for details.
There is a list argument to rm() that you can use in conjunction with ls():

rm(list = ls(pattern = "NY"))

Cheers,

Josh