[R] Curious warning in R for OS X w/Xwindows

Bear F. Braumoeller bbraumoeller at wcfia.harvard.edu
Wed Jul 23 20:05:08 CEST 2003


On Wednesday, July 23, 2003, at 05:03 AM, Peter Dalgaard BSA wrote:

> "Bear F. Braumoeller" <bbraumoeller at wcfia.harvard.edu> writes:
>
>> As to the other questions,
>>
>>> Sys.getenv("TERM")
>>     TERM
>> "xterm"
>>> Sys.getenv("PAGER")
>>            PAGER
>> "/usr/bin/less"
>>> options("pager")
>> $pager
>> [1] "/usr/local/lib/R/bin/pager"
>
> And less itself works OK in an xterm?  The above looks perfectly
> normal to me. The whole procedure is external to R: R writes a file,
> then fires up the pager on it, so it is difficult to imagine that
> something in R itself should cause the problem. You said that "man"
> works; does that use less as its pager too? "man whatever | less"
> might be illuminating.


I thought of that after I wrote, and I ran it through its paces -- less 
works like a charm.  I also piped the output specifically through 
/usr/bin/less in case (for some odd reason) the terminal was defaulting 
to a different copy of less than R was.  Still works just fine.

The only thing that I can see that might (??) be causing trouble is in 
/usr/local/lib/R/bin/pager, which reads

#!/bin/sh
## For the curious: "pager $1" doesn't work in batch, because "more" 
will
## eat the rest of stdin.  The no-argument version is intended for use 
at
## the end of a pipeline.
##
## PAGER is determined at configure time and recorded in `etc/Renviron'.
if test -n "${1}"; then
   exec ${PAGER} < ${1}
else
   exec ${PAGER}
fi

### Local Variables: ***
### mode: sh ***
### sh-indentation: 2 ***
### End: ***


-- but I don't know enough about how R is calling the pager to know 
what this is doing.


Bear F. Braumoeller
Assistant Professor
Department of Government
Harvard University
http://www.people.fas.harvard.edu/~bfbraum




More information about the R-help mailing list