Learn R Programming

Hmisc (version 5.3-0)

latexTabular: Convert a Data Frame or Matrix to a LaTeX Tabular

Description

latexTabular creates a character vector representing a matrix or data frame in a simple tabular environment.

Usage

latexTabular(x, headings=colnames(x),
             align =paste(rep('c',ncol(x)),collapse=''),
             halign=paste(rep('c',ncol(x)),collapse=''),
             helvetica=TRUE, translate=TRUE, hline=0, center=FALSE, ...)

Arguments

Value

a character string containing LaTeX markup

See Also

latex.default, format.df

Examples

Run this code
x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','this that')))
latexTabular(x)   # a character string with LaTeX markup

Run the code above in your browser using DataLab