Skip to content
Prev 272799 / 398498 Next

Removing objects and clearing memory

Here is another way. ls() gives you a list. get a number (n) of the item
you'd like to keep,
and then do:

rm(list=ls()[n+1:last])
rm(list=ls()[1:n-1])

ls() should return only one object after this.


--
View this message in context: http://r.789695.n4.nabble.com/Removing-objects-and-clearing-memory-tp3445763p3849780.html
Sent from the R help mailing list archive at Nabble.com.