xtable.decimal: Prints a LaTeX table with numeric columns aligned on their...

Description Usage Arguments Details Author(s) See Also

Description

This function wraps the xtable and print.xtable functions in the xtable package so that numeric columns are aligned on their decimal place.

Usage

1
2
3
## S3 method for class 'decimal'
xtable(x, cols = which(lapply(x, class) == "numeric"),
  colAlignment, tocharFun = prettyNum, ...)

Arguments

x

a data frame to create a LaTeX table from.

cols

a numeric vector indicating which columns should be aligned on decimal points. It defaults to all columns of type numeric.

colAlignment

named character vector where each element name corresponds to a

tocharFun

the function used to convert the numeric vector to a character vector. This defaults to prettyNum, but other possible options are as.character, format, formatC, or some other custom function.

...

other parameters passed to tocharFun, xtable, and print.xtable.

Details

See http://jason.bryer.org/posts/2013-01-04/xtable_with_aligned_decimals.html for more information.

Author(s)

Jason Bryer <jason@bryer.org>

See Also

xtable


dmenne/dlatex documentation built on May 15, 2019, 9:32 a.m.