latex_niceSigFig: Force Pretty Latex Significant Figure

Description Usage Arguments Value Creation notes Examples

View source: R/Rmd_helpers.R

Description

latex_niceSigFig() formats character vector in data to output as pretty sig fig

Usage

1
latex_niceSigFig(vec, digits = 3, addMathMode = TRUE)

Arguments

vec

vector that you want to force to output as sig fig in kable.

digits

integer that defines how many sig figs you wnat to keep.

addMathMode

logical TRUE if you want to add the $ signs around the output string.

Value

Returns character vector with special latex formating.

Creation notes

First created on 2019-Nov-14 in Homework_4.Rmd while working on homework for FNR647.

Examples

1
2
3
4
modelCoefTable(Q1_model, overdispersed = FALSE) %>%
 mutate(Coefficient = latex_character(Coefficient),
        `Pr(>|z|)`= latex_niceSigFig(`Pr(>|z|)`,digits = 3)) %>%
 kable(escape = F, booktabs = T, digits = 3)

jacpete/jpfxns2 documentation built on May 10, 2020, 9:15 p.m.