[R] deleting variables

Richard Pearson richard.pearson at postgrad.manchester.ac.uk
Tue Apr 29 17:27:13 CEST 2008


?rm

Richard

Ralf Goertz wrote:
> How can I automatically exclude one variable from being saved in the
> workspace when I quit an R session? The problem is I don't know how to
> erase a variable once it has been created.
> 
> Background: I open a connection called "con" to a database server in my
> ~/.Rprofile. Obviously, the connection expires when quitting the R
> session. Unfortunately, the workspace is loaded after ~/.Rprofile is
> run. So "con" get overwritten by the old workspace. I thought of using
> .First() or .Last() but as these are functions I don't know how to
> modify global variables.
> 
> Ralf
> 
> ______________________________________________
> R-help at 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.
> 

-- 
Richard D. Pearson             richard.pearson at postgrad.manchester.ac.uk
School of Computer Science,    http://www.cs.man.ac.uk/~pearsonr
University of Manchester,      Tel: +44 161 275 6178
Oxford Road,                   Mob: +44 7971 221181
Manchester M13 9PL, UK.        Fax: +44 161 275 6204



More information about the R-help mailing list