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

Joshua Wiley jwiley.psych at gmail.com
Sun Nov 14 11:31:11 CET 2010


On Sun, Nov 14, 2010 at 2:00 AM, Stephen Liu <satimis at yahoo.com> wrote:
> Hi folks,
>
> Tks for your advice.
>
> Summing up all your advice I performed following steps without success.
>
> 1)
>> rm (list = ls( ))
>> q()
> save working image
>
> 2)
>> rm (list = ls(all=TRUE))
>> q()
> save working image
>
> 3)
>> getwd()
> [1] "C:/Users/satimis"
> .Rhistory
>
>> list.files(path="C:\Users\satimis", all.files = FALSE)
> Error: '\U' used without hex digits in character string starting "C:\U"

You need to either escape the backslashes (with another backslash) or
use forward slashes.  Perhaps most simply:

list.files(path = getwd(), all.files = FALSE)

>
>> list.files(path="C:\Users\satimis", all.files = TRUE)
> Error: '\U' used without hex digits in character string starting "C:\U"
>
> -> Windows Explorer
> delete .Rhistory manually

don't forget the .Rdata file, history is separate.

>
>
> Start R
> ....
> [Previously saved workspace restored]
>
> is still there
>
>
> Please advise.  TIA

Sure the message is there but it should have restored an empty
workspace so it should have absolutely no impact on your work.  If the
message really bugs you, add the --vanilla flag when you start R.  If
you are using a shortcut to R, you can add it there, if you start R
from the command prompt you can use it directly just like "R
--vanilla".

Josh

>
> B.R.
> Stephen L
[snip]



More information about the R-help mailing list