[R] Graphical table in R

Thomas Lumley tlumley at u.washington.edu
Mon Jan 10 22:28:46 CET 2005


On Mon, 10 Jan 2005, Peter Dalgaard wrote:

> A screen shot of a ps file? That sounds ... weird. If you can view it,
> presumably you have Ghostscript and that can do png files.
>
> However, will textual output do?
>
>  plot(0,type="n",axes=FALSE, xlab="", ylab="")
>  con <- textConnection("txt","w")
>  sink(con); ftable(UCBAdmissions); sink()
>  close(con)
>  par(family="mono")
>  text(1,0,paste(txt,collapse="\n"))
>

and the middle three lines could also be done with

    txt<-capture.output(ftable(UCBAdmissions))


 	-thomas




More information about the R-help mailing list