df2latex {psych}R Documentation

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

Author(s)

William Revelle

See Also

The many LaTeX conversion routines in Hmisc.

Examples

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

[Package psych version 1.2.1 Index]