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

Stephen Liu satimis at yahoo.com
Mon Nov 15 02:42:40 CET 2010


Hi Josh,

Start "Command Prompt" as Admin

C:\Windows\system32>cd C:\Users\satimis

C:\Users\satimis>dir
 Volume in drive C has no label.
 Volume Serial Number is EC2D-3F1A

 Directory of C:\Users\satimis

11/14/2010  05:52 PM    <DIR>          .
11/14/2010  05:52 PM    <DIR>          ..
11/14/2010  01:58 PM                42 .RData
11/14/2010  07:33 PM                94 .Rhistory
05/11/2010  08:33 PM    <DIR>          AppData
08/06/2010  12:57 PM    <DIR>          Contacts
11/13/2010  12:00 AM    <DIR>          Desktop
11/14/2010  01:39 PM    <DIR>          Documents
08/27/2010  05:34 PM    <DIR>          Downloads
08/06/2010  12:57 PM    <DIR>          Favorites
08/06/2010  12:57 PM    <DIR>          Links
08/06/2010  12:57 PM    <DIR>          Music
08/06/2010  12:57 PM    <DIR>          Pictures
08/19/2010  10:34 AM    <DIR>          R
08/06/2010  12:57 PM    <DIR>          Saved Games
11/14/2010  07:31 PM    <DIR>          Searches
08/06/2010  12:57 PM    <DIR>          Videos
               2 File(s)            136 bytes
              15 Dir(s)  19,187,191,808 bytes free

.RData is there.

C:\Users\satimis>del .RData


Start R
the warning "[Previously saved workspace restored]" disappears

Thanks


B.R.
Stephen L



----- Original Message ----
From: Joshua Wiley <jwiley.psych at gmail.com>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Mon, November 15, 2010 1:26:16 AM
Subject: Re: [R] How to permanently remove [Previously saved workspace restored]

@Stephen  Sorry, Duncan's right, it is likely not a protected/hidden
file issue.  At the risk of nuking the fridge, you could also open an
elevated command prompt then navigate to the relevant directory and
delete the file:

> cd C:\Users\satimis
> del .RData
> exit

Probably too much trouble for deleting a single file, but handy if you
want to do a lot (e.g., all files with the *.RData extension or...).
The new PowerShell is starting to grow on me too (it seems wider), but
I am not as familiar with the commands.

Josh

On Sun, Nov 14, 2010 at 8:43 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
>> This is likely a "feature" of Windows Explorer....certain types of
>> files are hidden by default (like those that start with ".").
>
> That's not true:  it's Unix ls that hides filenames starting with a ".".
>  Windows Explorer does hide some files, but I don't think it is ever based
> on the name, it's based on the attributes.
>
> What Windows Explorer does that is incredibly stupid is that (by default) it
> hides file extensions for known file types.  Generally ".RData" will be
> registered as a known file type.  Exporer will cut off the ".RData" part the
> name of a file with that extension, and only show the first part of the
> name.  Since the file ".RData" has no starting part of a name, it will be
> listed with a blank name.
>
> What you should do (and what Microsoft should set the default to) is to turn
> off this bad policy of listing filenames incorrectly.  I don't remember how
> to do it in Windows 7 or Vista, but on XP, here's how:
>
> Go into Explorer in some folder.
>
> Click on the "Tools" menu, then the "Folder Options..." choice.
>
> Choose the View tab.
>
> About 10 choices down within Files and Folders, you'll see "Hide Extensions
> for Known File Types".  Make sure this is *not* checked.

@Duncan  You're right, as usual.  I mixed Windows and Linux.  Changing
the setting for extensions is basically as you described on my Windows
7 except I have to hit the left alt for Windows Explorer to even show
the file menu where I can click on Tools -> Folder Options (maybe just
my configuration).  Does .RData get registered by default but not
.Rhistory? (since Stephen reported seeing the .Rhistory file).

>
> If you're sane, you'll then click on the button "Apply to all folders", but
> you might just want to click on "OK" to try it out on one folder first.
>
> Duncan Murdoch






More information about the R-help mailing list