You can try rm(list = ls()[!(ls() %in% "index")]).
-Christos > -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Luc Villandre > Sent: Friday, May 29, 2009 2:06 PM > To: fernando espindola > Cc: r-help@r-project.org > Subject: Re: [R] remove object > > > fernando espindola wrote: > > Hi list.... > > I try to remove all object less one, this object is called > index. I have many object with different names and pattern > option in ls function may not remove this object why any word > in index object repeats with other object. > Anybody can give me one advise for this question.... > > Thank for all > > fernando > > [[alternative HTML version deleted]] > > ______________________________________________ > [1]r-h...@r-project.org mailing list > [2]https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > [3]http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > > Hi Fernando, > Using "grep" is most likely the way to go, but without at > least a sample of > the names of the objects in your workspace, I'm afraid I > can't really help > you more. > Cheers, > > -- > Luc Villandré > Biostatistician > McGill University Health Center - > Montreal Children's Hospital Research Institute > > References > > 1. mailto:R-help@r-project.org > 2. https://stat.ethz.ch/mailman/listinfo/r-help > 3. http://www.R-project.org/posting-guide.html > ______________________________________________ > 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. > > ______________________________________________ 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.