[R-SIG-Mac] system('man R') works in Mac unix R but not in GUI R
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Mar 25 15:56:06 CET 2011
On Fri, 25 Mar 2011, Kasper Daniel Hansen wrote:
> On Fri, Mar 25, 2011 at 9:14 AM, Joseph Kunkel <joe at bio.umass.edu> wrote:
>> 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.
> 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).
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.
> In this case it is because vi ships with the system and the man page
> for vi is in
> # man -w vi
> 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
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
(Try 'locate R.1': all the other instances are in my own development
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.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-SIG-Mac