[R] searching for special variables
Dimitris Rizopoulos
dimitris.rizopoulos at med.kuleuven.be
Thu May 3 10:20:08 CEST 2007
one option is use something like the following:
a <- 1:10
b777 <- rnorm(10)
c777 <- letters[1:6]
fit <- lm(b777 ~ a)
a777d777 <- 5
##############
lis <- ls()
rm(list = c(lis[grep("777", lis)], "lis"))
ls()
I hope it helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Schmitt, Corinna" <Corinna.Schmitt at igb.fraunhofer.de>
To: <r-help at stat.math.ethz.ch>
Cc: "Schmitt, Corinna" <Corinna.Schmitt at igb.fraunhofer.de>
Sent: Thursday, May 03, 2007 9:58 AM
Subject: [R] searching for special variables
> Dear R-Experts,
>
> in my program I have a big workspace. Now I want to look for all
> variables which have the letters "777" in their name (e.g.
> ask777first)
> and afterwards I need to delete those variables. How can I reach
> this
> aim?
>
> Any ideas, Corinna
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the R-help
mailing list