[R] help output paged in separate window
Robert.Espesser@lpl.univ-aix.fr
Robert.Espesser at lpl.univ-aix.fr
Tue May 27 07:33:17 CEST 2003
You have to run the xterm in background , then you can go on with R
see below the modification of helpless:
....
.....
sys.command<-paste("xterm -e less ",helpfile,sep="",collape="")
# append "&", to launch xterm -e helpfile in background
sys.command <- paste(sys.command, " &",sep="",collape="")
system(sys.command)
}
> 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 ------------------------------
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list