[R] subsetting ls() as per class...

akshay kulkarni @k@h@y_e4 @ending from hotm@il@com
Sat Jul 28 07:58:36 CEST 2018


dear memebers,
                               I am using R in AWS linux instance for my research. I want to remove certain objects from the global environment  to reduce my EBS cost..for example, I want to remove all objects of class "xts", "zoo". Is there any way to automate this, instead of removing the objects one by one?

Basically, I want to subset  ls() according to class, and then remove that subset by using rm function.

I got to know about mget in SO, but that is not working in my case....

Also, all the above objects end with ".NS".  I came to know that you can remove objects starting with a certain pattern; is there any way to remove objects ending in a certain pattern?

very many thanks for your time and effort...
yours sincerely,
AKSHAY M KULKARNI

	[[alternative HTML version deleted]]



More information about the R-help mailing list