Re: [R] .Rprofile under Windoze.

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu 31 Aug 2006 - 10:01:38 EST

On 8/30/2006 5:49 PM, Rolf Turner wrote:
> I am (for my sins) having to do some work using R under Windoze. I
> wanted to set up a .Rprofile to control my set-up. The docs on
> .Rprofile say that it can/should be placed in ``the user's home
> directory''. ``An Introduction to R'' observes lucidly that this
> concept needs to be clarified under Windoze.
>
> Following the suggestions in An Introduction to R, I tried
> putting a .Rprofile in
>
> "C:\Documents and Settings\rolf\My Documents"

That's probably the right place. You can confirm in the R Edit|GUI preferences dialog: it defaults to trying to save or load from the same place it would look for .Rprofile.

>
> When that didn't work, I tried putting it in the starting directory
> (and confirmed that I'd got that right by checking with getwd() and
> list.files(all.files=TRUE) ).
>
> The last invocation indicated that the name of the file was *really*
> ``.Rprofile.txt'' --- although I'd tried to save it as (simply)
> ``.Rprofile''. Is that the problem? If so, how can I persuade
> Windoze NOT to stick that damned .txt tag on the end?

You can put it in double quotes. It's really your editor doing this; most reasonable editors (but not the ones that come with Windows) are configurable to never add the extension.

Another change to Windows defaults that's essential to maintain sanity is to tell it to display full filenames, not to hide the .txt in the first place. You do this in an Explorer window by clicking on "Tools|Folder options...|View|Hide extensions for known file types" (where each of the 4 components in that path is a different kind of interface element. I love the rich Windows user interface!)

Duncan Murdoch

(Gawd, but I
> ***hate*** Windoze!!!) If that's not the problem, can you suggest
> what *is* the problem?
>
> All that .Rprofile(.txt) has in it at the moment is
>
> options(prompt="Wheee! ")
>
> so that I can easily tell whether it's working. If I
> execute
>
> > source(".Rprofile.txt")
>
> the prompt does indeed get changed to ``Wheee! '' as it should.
>
> I would appreciate enlightenment. Ta.
>
> cheers,
>
> Rolf Turner
> rolf@math.unb.ca
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.



R-help@stat.math.ethz.ch 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. Received on Thu Aug 31 11:10:03 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 31 Aug 2006 - 12:26:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.