psych (version 1.1.11)

df2latex: Convert a data frame or matrix to a LaTeX table

Description

A handy helper function to convert data frames or matrices to LaTeX tables. Although Sweave is the preferred means of converting R output to LaTeX, it is sometimes useful to go directly from a data.frame or matrix to a LaTeX table.

Usage

df2latex(x,digits=2,rowlabels=TRUE,caption="df2latex")

Arguments

x
A data frame or matrix to convert to LaTeX
digits
Round the output to digits of accuracy. NULL for formatting character data
rowlabels
If TRUE, use the row names from the matrix or data.frame
caption
The table caption

Value

  • A LaTeX table

See Also

The many LaTeX conversion routines in Hmisc.

Examples

Run this code
df2latex(Thurstone,rowlabels=FALSE)
df2latex(describe(sat.act)[2:10])

Run the code above in your browser using DataLab