SOLVED: Re: [R] help output paged in separate window
Greg Louis
glouis at dynamicro.on.ca
Tue May 27 13:47:01 CEST 2003
On 20030527 (Tue) at 1123:52 +0100, Ted Harding wrote:
> On 27-May-03 Ted Harding wrote:
> > 1. Create a file in your $PATH with name "pgr" containg the lines
> > #! /bin/bash
> > export HLPFIL=`mktemp R_hlp.tmp.XXXXXX`
> > cat > $HLPFIL
> > xterm -e less $HLPFIL &
> >
> > 2. Give R the command options(page="pgr") where "pgr" can be replaced
> > by a full pathname if required.
> > [...]
> > If you use this a lot, you will find it handy to have a method of
> > automatically deleting all the "R_hlp.tmp.XXXXXX" files you've created
> > in a session.
>
> For anyone who wants details of how to set all this up automatically, try
> the following:
>
> Edit your ~/.Rprofile to include (as well as anything else that's there):
>
> options(pager="~/pgr")
> .Last <- function() {
> system("rm R_hlp.tmp.*")
> }
>
This also works on Linux, except it removes the temporary file when the
pager exits:
#! /bin/bash
export HLPFIL=`mktemp R_hlp.tmp.XXXXXX`
cat > $HLPFIL
xterm -e less $HLPFIL & lpid=$!
wait $lpid
/bin/rm $HLPFIL
--
| G r e g L o u i s | gpg public key: finger |
| http://www.bgl.nu/~glouis | glouis at consultronics.com |
More information about the R-help
mailing list