[R] help output paged in separate window
(Ted Harding)
Ted.Harding at nessie.mcc.ac.uk
Mon May 26 21:03:42 CEST 2003
On 26-May-03 Jim Lemon wrote:
> Well, here is a little function derived from the help browser macro I
> wrote for NEdit that will fire up an xterm with less displaying the
> help for a function.
> Jim
>
> helpless<-function(topic) {
> topic<-substitute(topic)
> sys.command<-paste("locate ",topic,sep="",collapse="")
> helpfilelist<-system(sys.command,TRUE)
> helpmatch<-paste("help/",topic,sep="",collapse="")
> # find the R text help file(s)
> helpfile<-helpfilelist[grep(helpmatch,helpfilelist)]
> # assume that the shortest name matching "topic" will be the one
> if(length(helpfile) > 1)
> helpfile<-helpfile[which.min(nchar(helpfile))]
> sys.command<-paste("xterm -e less ",helpfile,sep="",collapse="")
> system(sys.command)
> }
Well that's neat! I must study it and learn some of the tricks.
They look useful. The only thing I have against it is that it
doesn't detach from the R window, unlike tkpager which conveniently
does, so it's not possible to continue working in R while reading
help (leaving one as it were helpless ... ).
Thanks, and best wishes,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 26-May-03 Time: 20:03:41
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list