[R] Delete all object except some particular ones

Nikhil Kaza nikhil.list at gmail.com
Sat Mar 20 17:17:08 CET 2010


rm(setdiff(ls(), c("AA", "BB")) should work.

On Mar 20, 2010, at 12:27 PM, bogaso.christofer wrote:

> Dear all, in my working project, I have created huge number of  
> different
> kind of objects including "AA" and "BB". Now I want to delete all  
> objects
> except that "AA" and "BB". Is there any procedure in R to do that ?
>
>
>
> Thanks,
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list