[R] Printer

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Jun 28 18:58:20 CEST 2001


cjb <cjb at di.fct.unl.pt> writes:

> I am an econometrics student using R-1.3.0 version for Linux. I have
> searched in all manuals but couldn´t find a most important iformation.
> 
> Would you please be kind enough to give me some hints how do I print the
> output to a printer (not only to the screen). Is it the cat ()
> instruction? The print() instruction places the output on the screen but
> does not send the output to the printer.

You can use sink() on a connection like pipe("lpr") or
pipe("enscript") depending on your setup. However, I usually realize
that I want to print something only after seeing it on the screen and
sink() requires you to plan ahead. Instead, I'd just fire up another
window, enter the command that prints from stdin (e.g. enscript), copy
and paste the relevant contents of the R window, and hit ctrl-D. (A
good long scrollback on your terminal windows will be helpful.)

If you use ESS (Emacs speaks statistics), then you simply handle the R
buffer as an ordinary file and you can use the toplevel menu to "Print
region", etc.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list