Skip to content

saved workspace

7 messages · bogdanno, Sarah Goslee, David Winsemius +2 more

#
I saved the workspace once and now it automatically restore it
whenever I open R
How can I turn off this?
Thank you
#
Assuming you are starting R from a terminal window, you can use
R --no-restore
or change to a different directory first.

If you are starting R in some other fashion, it will depend on what you
are doing, a piece of information you neglected to provide (along with
OS, which could be relevant, and is requested regardless).

Sarah
On Fri, Apr 24, 2009 at 1:49 PM, bogdanno <bodinsoul at gmail.com> wrote:

  
    
#
One could also move the file out of the R search path, or rename it  
with an extension that prevents R from seeing it.( Some operating  
systems may not allow you to see it in their default mode, however.)
#
I am using it from Windows XP. I have never used Linux or Unix.
I do not have a terminal window, so --no-restore doesn't work.(I
think)
I open R just by clicking on the R icon and a console opens up.
I have tried to move and rename the file but still R loads it-which
makes me think it was copied somewhere else. It'
Thank you
On Apr 24, 2:07?pm, Sarah Goslee <sarah.gos... at gmail.com> wrote:
#
OK, I found the file and moved and renamed it And now it doesn't load
anymore.
It's a weird method though-there should be a command for that purpose.
#
There are functions for that, see ?unlink and ?file.rename (and several others on that same page).  They can be used to remove or rename the .Rdata file, but there are several other ways to remove/rename the file as well.  Under windows you can click on the file menu, choose "Load Workspace", then right click on the file and choose from the menu whether to delete or rename.  But it is still easiest to do deleting/renaming using the operating system before running R.

You could have also removed everything from your workspace while running R, then saved the now empty workspace (there are commands/functions to do those things as well).  Then the next time you start R the empty workspace will load quickly enough that you probably won't notice.