Skip to content

Remove

4 messages · Alvaro Colina Santamaria, Rashid Nassar, Stephanie Langevin

#
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:

            
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:

            
I 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._