Hello, I would like to remove some files which have the extension .test for example (data1.test, data2.test ....). Is there another solution to remove them instead of doing it one by one ? Thanks for your help, St?phanie Langevin -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Stephanie Langevin wrote:> Hello, > > I would like to remove some files which have the extension .test for > example (data1.test, data2.test ....). > Is there another solution to remove them instead of doing it one by one > ? > > Thanks for your help, > St?phanie Langevin > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._You can use: rm(list=objects(pattern=".test")) -- =============================================================Alvaro Colina |-|o||o||o||o||o||o||o||o||o|- Area de Quimica Analitica | Pza. Misael Banuelos s/n Facultad de Ciencias | 09001. Burgos. Spain Universidad de Burgos | Phone: 34-947-258817 e-mail: acosa at ubu.es | FAX: 34-947-258831 ============================================================= -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 7 Mar 2001, Stephanie Langevin wrote:> Date: Wed, 07 Mar 2001 12:18:49 +0000 > From: Stephanie Langevin <langevin at valigen.net> > To: r-help at stat.math.ethz.ch > Subject: [R] Remove > > Hello, > > I would like to remove some files which have the extension .test for > example (data1.test, data2.test ....). > Is there another solution to remove them instead of doing it one by one > ? > > Thanks for your help, > Stéphanie LangevinI would do: ls(pat = "[.]test$") # to first list the objects to be removed to make # sure they don't include something you don't want # to remove, then rm(list = ls(pat = "[.]test$")) Rashid Nassar -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
At 13:49 07/03/01 +0100, Alvaro Colina Santamaria wrote:>Stephanie Langevin wrote: > >> Hello, >> >> I would like to remove some files which have the extension .test for >> example (data1.test, data2.test ....). >> Is there another solution to remove them instead of doing it one by one >> ? >> >> Thanks for your help, >> St?phanie Langevin >> >>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.->> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html >> Send "info", "help", or "[un]subscribe" >> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._> >You can use: > >rm(list=objects(pattern=".test"))I understood that St?phanie wanted to remove files on her system, not R objects from R's workspace. Thus I suggested: system("rm *.test") (assuming a Unix/Linux OS) Emmanuel Paradis -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
To my mind, the best solution is this one (R Lunix): rm(list = ls(pat = "[.]test$")) rm(list=objects(pattern=".test")) Thanks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>> I would like to remove some files which have the extension .test for>> example (data1.test, data2.test ....). >> Is there another solution to remove them instead of doing it one byone> system("rm *.test") >(assuming a Unix/Linux OS)You might try unlink("*.test") which is not system dependent. Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._