Learn R Programming

tables (version 0.3)

latexNumeric: Process numeric LaTeX values.

Description

This takes formatted strings as produced by format from numeric values, and modifies them to LaTeX code that retains the spacing, and renders minus signs properly. The default formatting in tabular uses this to maintain proper alignment.

Usage

latexNumeric(chars, minus = TRUE, pad = TRUE, mathmode = TRUE)

Arguments

Value

A character vector of the same length as chars, with modifications to render properly in LaTeX.

Examples

Run this code
latexNumeric(format(c(1.1,-1,10,-10)))

Run the code above in your browser using DataLab