Frank E Harrell Jr
2001-Apr-17 14:17 UTC
[R] Pretty printing of frequency and other tables
I frequently use an S-Plus function print.char.matrix for printing boxed tables. I use LaTeX even more frequently, for which I (and Rich Heiberger) have a series of functions that will be in the Hmisc library in R before too long. [I have seen some other interesting functions for latex already in R.] But it would still be nice to have an equivalent of print.char.matrix in R for ordinary printing. If anyone knows of anything close to it please let me know. -- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 17 Apr 2001, Frank E Harrell Jr wrote:> I frequently use an S-Plus function print.char.matrix for > printing boxed tables. I use LaTeX even more frequently, > for which I (and Rich Heiberger) have a series of functions > that will be in the Hmisc library in R before too long. > [I have seen some other interesting functions for latex > already in R.] But it would still be nice to have > an equivalent of print.char.matrix in R for ordinary > printing. If anyone knows of anything close to it > please let me know.There isn't an exact equivalent. write.table, format, and formatC seem to provide the functionality. In particular, write.table is what I use for producing LaTeX tabulars. -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._