Skip to content
Back to formatted view

Raw Message

Message-ID: <XFMail.030526200341.Ted.Harding@nessie.mcc.ac.uk>
Date: 2003-05-26T19:03:42Z
From: (Ted Harding)
Subject: help output paged in separate window
In-Reply-To: <20030526121920.IETJ16123.mta07.mail.mel.aone.net.au@there>

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 ------------------------------