[R] How to permanently remove [Previously saved workspace restored]

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Nov 14 10:27:32 CET 2010


On Sun, 14 Nov 2010, Yuliya Matveyeva wrote:

> Good afternoon,
> I am actually concerned with this issue too. What if I run R at work and I
> simply do not have the necessary access-rights in order to delete the .Rdata
> file. Do I really have only 3 choices: ask the admin to delete it, live with
> it always reloading the previous workspace, resave an empty workspace.
> That'd be sad if it really was like that...

It isn't.  Please do read 'An Introduction to R': you can start R with 
--no-restore.

And BTW

>>>> rm (list = ls( ))

isn't correct: it needs to be

rm (list = ls(all=TRUE))

However, I suspect that YM is starting R with a non-writable working 
directory, and (on Windows) the suggestion is that you create a new 
shortcut with the working directory (the 'Start in' property) changed 
to the base directory of your project.

We've seen instances with an all-users adminstrator install of R on 
Windows 7 (but not earlier) that non-administrator users cannot edit 
nor copy the shortcut on their desktop.  This seems to be a bug in 
Windows, so simply create a new one to (e.g.)
c:/Program Files/R/R-2.12.0/bin/i386/Rgui.exe

>
> 2010/11/14 Peter Langfelder <peter.langfelder at gmail.com>
>
>> On Sat, Nov 13, 2010 at 10:33 PM, Stephen Liu <satimis at yahoo.com> wrote:
>>> Win 7 64 bit
>>> R version 2.11.1 (2010-05-31)
>>>
>>>
>>> How to permanently remove;
>>> [Previously saved workspace restored]
>>>
>>>> rm (list = ls( ))
>>>
>>> On next start it still displays;
>>> .....
>>> [Previously saved workspace restored]
>>>
>>>
>>> There is a file keeping the previous data on Linux
>>> .Rdata
>>
>> To the best of my knowledge there's an .RData file on Windows as well.
>> Check your default directory (usually Documents but may be something
>> else - start R as usual and type getwd() before you do anything).
>> Remove the .RData file as well the file .Rhistory and you should be
>> good to go.
>>
>> Peter
>>
>> ______________________________________________
>> 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.
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list