[R-SIG-Mac] Questions about .Rdata, .Rprofile and workspaces
Rob Goedman
robjgoedman at me.com
Thu Sep 8 18:33:09 CEST 2011
Hi Heidi,
On Sep 8, 2011, at 8:42 AM, Heidi Bissell wrote:
> Hi Rob,
>
>>
>> 1) Can you try to set the 'Clean up history items'?
>
> Yes! That did the trick! Thank you.
Great.
>> 2) Move .Rprofile to your home directory (not your R working directory).
>
> This also worked (along with setting R preferences to default to that
> directory as well),
You mean the R.app preferences? That should not be necessary if there is no .Rprofile in your R.app working dir.
I believe your understanding as expressed in your first email is correct:
R (not R.app) will indeed search in the current directory and then in your home directory for a .Rprofile.
R.app will change to the specified working dir before invoking R so if there is a .Rprofile in your R.app working dir that would take precedence.
So something fishy is going on here.
Are the permissions for .Rprofile in your home and working dirs identical? Can you send me the 2 .Rprofile files?
Rob
> but I'd really rather have all my R files together
> somewhere for ease in backing up and transferring to different
> computers. Would a better way be to create a source file to read in
> at the beginning of each session? Actually, I thought that's what a
> .Rprofile was. I read that you could put a different .Rprofile in
> each project directory and initialize your sessions with the proper
> settings for each project that way (by dragging and dropping a
> directory onto the Rapp icon, it would start up ready to work on that
> project). At the moment, all my projects use the same settings, but I
> can see that changing in the future. What's the best way to do this?
> Thanks for your speedy and helpful reply!
>
> Heidi
>
>
>>
>> Regards,
>> Rob
>>
>>
>> On Sep 8, 2011, at 7:50 AM, Heidi Bissell wrote:
>>
>>> I've been fiddling with some of the default R locations and settings
>>> and have created a muddle. I'm using the R.app GUI.
>>>
>>> My questions:
>>>
>>> 1) When I start a new session, hitting the up arrow once gives me one
>>> long printout of every command from my previous session, rather than
>>> taking me back one command at a time like it does within the current
>>> session. How can I get the one-line-at-a-time-type history from the
>>> previous session?
>>>
>>> 2) When I created my .Rprofile file (in my default working directory,
>>> see below), I added a few items. Each time I open the R.app, those
>>> original items load. However, I have since edited the .Rprofile file
>>> to include some additional settings and these never load. If I open
>>> the .Rprofile text file, it includes the new commands. Did R save my
>>> original .Rprofile somewhere else? I know (but don't really
>>> understand) that there is a hierarchy of .Rprofile files, but I don't
>>> know where to look for them. There aren't in my ~/Library/R folder.
>>> The only place I can find a .Rprofile is where I manually created it
>>> in my working directory.
>>>
>>> Thank you,
>>>
>>> Heidi
>>>
>>> Mac OS X 7.0 (Lion)
>>> R 32 bit GUI 2.13.1
>>>
>>> In Preferences > Startup:
>>> Directory: ~Documents/Stats (always apply)
>>> History: (checked) Read history file on startup, location is
>>> ~/Documents/Stats/.Rapp.history (nothing else checked)
>>> Save Workspace on Exit: No
>>>
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>
>
>
> --
> Heidi Bissell 海迪
> Doctoral Candidate
> Department of Zoology
> University of Wisconsin-Madison
> https://mywebspace.wisc.edu/hbissell/web/
More information about the R-SIG-Mac
mailing list