Skip to content

system('man R') works in Mac unix R but not in GUI R

4 messages · Kasper Daniel Hansen, Brian Ripley, Joseph Kunkel

#
Using  R 2.12.2 GUI 1.36 Leopard build 64-bit (5691)

system('man R') gives error: 'No manual entry for R' ...  ??

Running R in a unix window the system('man R') function provides the expected manual entry.

This complicates my teaching of R with the Gui if I want to use the system('R ...') function.   Students need to know unix-window-use as a prereq.

system('man vi')  however does provide the correct unix vi manual in either unix or GUI.

-?.  .? ?.  .><((((?>?.  .? ?.  .><((((?>?.  .? ?.  .><((((?> .??.? >=-       =?}}}}}><
Joseph G. Kunkel, Professor
Biology Department
University of Massachusetts Amherst
Amherst MA 01003
http://www.bio.umass.edu/biology/kunkel/
#
On Fri, Mar 25, 2011 at 9:14 AM, Joseph Kunkel <joe at bio.umass.edu> wrote:
Well, as you might know, setting PATH and other environment variables
in the terminal using, say .profile or .bashrc, does not make them set
inside of a GUI.  This has been discussed many times on this list (and
really has nothing to do with R at all).

In this case it is because vi ships with the system and the man page
for vi is in
# man -w vi
/usr/share/man/man1/vi.1.gz

I do not have the GUI (CRAN) version of R installed, but I would guess
that the man page is in /usr/local/share ..., and you can check the
directories man searches by
# man -d

Kasper
#
On Fri, 25 Mar 2011, Kasper Daniel Hansen wrote:

            
Note though that this is slightly different: it is about what is set 
in the shell which system() launches from R.app, not the usual 
question of what variables are set for R.app itself.
I do, and 'man R' does not find it (and it is not under 
/usr/local/share/man, which is on my system searched from system() in 
R.app).  My reading of the CRAN installation scripts is that it is 
only installed in 
/Library/Frameworks/R.framework/Versions/2.13/Resources/man1
(Try 'locate R.1': all the other instances are in my own development 
area.)

So I think the question should rather be why 'man R' works in a 'unix 
window' (whatever that really is).

And also why you think 'man R' is useful for your students, rather 
than say 'R --help' (from which it is derived by a Perl script) or the 
'Introduction to R' manual.
#
On "Why use 'man R'?"   

Hooray, system('R --help') works in both a unix-terminal-R session and also in the GUI!   My problem solved.

Thanks!!

Joe
On Mar 25, 2011, at 10:56 AM, Prof Brian Ripley wrote:

            
-?.  .? ?.  .><((((?>?.  .? ?.  .><((((?>?.  .? ?.  .><((((?> .??.? >=-       =?}}}}}><
Joseph G. Kunkel, Professor
Biology Department
University of Massachusetts Amherst
Amherst MA 01003
http://www.bio.umass.edu/biology/kunkel/