[R-SIG-Mac] help() start page - how to set

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Nov 18 04:48:14 CET 2008


On Nov 17, 2008, at 9:04 PM, Bill Northcott wrote:

> On 18/11/2008, at 12:37 PM, Steve Lianoglou wrote:
>> I'm curious to see if using StatET is useful, too ... as this is  
>> quite eclipse/plugin specific, perhaps you'd get better feedback  
>> from the StatET mailing list?
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/statet-user
>
> I started there but they have no clue about MacOS.

Oh ... I didn't see any messages related to this in their archives, so  
I thought maybe you didn't find them, sorry.

> I was looking for someone who might understand how this stuff  
> normally works on a Mac and hence I might be able to see what is  
> going wrong.

When you create a run config for R (Run > Run Confgurations ...), in  
the "Main" tab, you have a drop down box with "Launch" options. The  
Rterm option works, the RMI/JRI option doesn't.

Ideally I guess we want RMI/JRI ... here's what happens.


Launch R w/ Rterm
===============

I added --no-save in the Options/Arguments box, but I'm not sure that  
matters, anyway, when you run the config, this works:

R> > Sys.getenv('R_SESSION_TMPDIR')
Sys.getenv('R_SESSION_TMPDIR')
                                                R_SESSION_TMPDIR
"/var/folders/kL/kLbJmLNyEWa6w5gv6nb60U+++TI/-Tmp-//Rtmpp01O7b"

R> help.start()
help.start()
Making links in per-session dir ... done
If '/usr/bin/open' is already running, it is *not* restarted, and you
     must switch to its window.
Otherwise, be patient ...

# Browser pops up with the page you want

Launch R w/ RMI/JRI
=================

Yes: bizarre. I can't get anything to work.

I can effectively get the R_SESSION_TMPDIR to be "what I want" by  
setting the TMPDIR environment variable in the Run config's  
Environment tab. For instance, I have TMPDIR set to "/Users/stavros/ 
tmp". The R_SESSION_TMPDIR var is then:

R> Sys.getenv('R_SESSION_TMPDIR')
                R_SESSION_TMPDIR
"/Users/stavros/tmp/RtmpS1zNun"

I'm still getting some the same errors, though, as the R process isn't  
making the required directories. I wonder if it has something to do w/  
java communicating the R process via RMI ... I don't really know.

> It is attempting to access this .R directory in the location defined  
> by $R_SESSION_TMPDIR.   At what point might R be expected to create  
> that?   When I run R in a Terminal these directories get created.

So, after playing w/ this for a bit, I guess that:

(1) The $R_SESSION_TMPDIR is just created by monkeying with the  
environments defined TMPDIR variable, which we can change in the Run  
config's settings (like above)

(2) The "RtmpS1zNun" is created when R starts up
(3) The .R directory is then created after help.start() is executed.

I got (2) and (3) when running from the Terminal.

You know: I think I've realized what's going on, and I'm not sure how  
to fix it. It looks as if the running R process doesn't have the  
appropriate R environment variables set. For instance, in the RMI/JRI  
mode, look:

R> Sys.getenv('USER')
USER
   ""

Likewise, the "help-links.sh" (in "/Library/Frameworks/R.framework/ 
Versions/2.8/Resources/share/sh") script that the help.start()  
function uses requires environment variables like "R_DOC_DIR",  
"USER_R_HOME", to be set. All of these are empty. I tried setting the  
"R_DOC_DIR" to the appropriate location in the Run config's  
environment tab, but that's still not enough.

I can't really spend much more time on this now, but I think the  
problem is somewhere buried in there ...

-steve

--
Steve Lianoglou
Graduate Student: Physiology, Biophysics and Systems Biology
Weill Medical College of Cornell University

http://cbio.mskcc.org/~lianos



More information about the R-SIG-Mac mailing list