[R] Graphical table in R

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Jan 10 22:01:08 CET 2005


Dan Bolser <dmb at mrc-dunn.cam.ac.uk> writes:

> Cheers. This is really me just being lazy (as usual). The latex function
> in Hmisc allows me to make a .ps file then grab a screen shot of that ps
> and make a .png file.
> 
> I would just like to use plot so I can wrap it in a png command and not
> have to use the 'screen shot' in between.

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"))


-- 
   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




More information about the R-help mailing list