Dear R users,

I've got over a hundred R objects in the workspace. They all follow a pattern for years and months. Like this:
TT_1981_1, TT_1981_2, TT_1981_3, . . . . TT_1981_12
.
.
.
TT_2010_1, . . .

If now, I'd like to remove a selection of them, how is the best way to do it? Currently I need to use a big chunk of code.

I've tried various things but they don't work.
For instance:
rm(paste("RR_", 1981:2010, "_1", sep=""))
rm(list(paste("RR_", 1981:2010, "_1", sep="")))

I'd be great if you have any ideas that you think may help.

Thanks a lot!

Beatriz

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to