howto remove all variables (cleanup)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

howto remove all variables (cleanup)

Jonas Stein
Hi,

as i am quite new to R i often play around with commands in R until my graph
looks nice.

After testing things there are often lots of variables left. How can i reset
all vars in one command before i do the final plot?

At the moment i restart rkward (my editor) but thats a bit uncomfortable...

--
kind regards,

Jonas Stein <[hidden email]>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: howto remove all variables (cleanup)

XU Denver
rm(list=ls(all=TRUE))
but be careful to use it.



2007/11/25, Jonas Stein <[hidden email]>:

> Hi,
>
> as i am quite new to R i often play around with commands in R until my graph
> looks nice.
>
> After testing things there are often lots of variables left. How can i reset
> all vars in one command before i do the final plot?
>
> At the moment i restart rkward (my editor) but thats a bit uncomfortable...
>
> --
> kind regards,
>
> Jonas Stein <[hidden email]>
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: howto remove all variables (cleanup)

Gábor Csárdi-2
In reply to this post by Jonas Stein
rm(list=ls())

G.

On Sun, Nov 25, 2007 at 01:12:19PM +0100, Jonas Stein wrote:

> Hi,
>
> as i am quite new to R i often play around with commands in R until my graph
> looks nice.
>
> After testing things there are often lots of variables left. How can i reset
> all vars in one command before i do the final plot?
>
> At the moment i restart rkward (my editor) but thats a bit uncomfortable...
>
> --
> kind regards,
>
> Jonas Stein <[hidden email]>
>
> ______________________________________________
> [hidden email] 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.

--
Csardi Gabor <[hidden email]>    MTA RMKI, ELTE TTK

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: howto remove all variables (cleanup)

John Kane-2
In reply to this post by Jonas Stein
I see a couple of people have already supplied
rm(list=ls())  

A function that I find useful is the ?keep in the
gdata library. It allows you to keep just a few things
that you want to work with and clean up all the odds &
sods.


--- Jonas Stein <[hidden email]> wrote:

> Hi,
>
> as i am quite new to R i often play around with
> commands in R until my graph
> looks nice.
>
> After testing things there are often lots of
> variables left. How can i reset
> all vars in one command before i do the final plot?
>
> At the moment i restart rkward (my editor) but thats
> a bit uncomfortable...
>
> --
> kind regards,
>
> Jonas Stein <[hidden email]>
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.