[R] help in a separate window under linux

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Sep 18 14:33:31 CEST 2001


baron at cattell.psych.upenn.edu (Jonathan Baron) writes:

> >From owner-r-help at stat.math.ethz.ch Tue Sep 18 07:23:04 2001
> >Is there a simple way of configuring R under linux to put its help messages
> >into a separate, new console?
> 
> 1. help.start() puts them in a browser.
> 
> 2. You can make a bookmark or button on your browser for the R
> documents in html on your disk, usually in /usr/lib/R/doc/html.
> 
> 3. You can have R itself running twice in different windows, once
> just for help.  This is probably the most straightforward answer.
> (In Gnome, you can put it in a different virtual desktop, and
> switch back and forth with alt-shift-arrow - which is exceedingly
> easy on a Kinesis keyboard.  I do this because my monitor is only
> 17 inches, which is about right for one window.)
> 
> 4. You can use ESS, which uses the bottom half of the screen for
> help.  I usually find that I want the whole screen, though, so I
> end up closing the help window.
> 
> Perhaps there are other answers.  Jon Baron

5. library(tcltk); options(pager=tkpager)

6. options(pager="./mypager") with mypager
#!/bin/sh
cat > /tmp/foo
xterm -e less /tmp/foo &

(getting a unique tempfile name and removing it when you're through
reading is - um - an exercise for the reader)

7. options(pager=function(file, header, title, delete.file)
     system(paste("xterm", "-e less", file, "&")))

(getting the title right is going to be tricky:  it is generally
something like "R Help on `ls'" and the quotes will confuse the shell) 

The latter two obviously only work when less is installed...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list