formatEffectTable: Format an effect table

Description Usage Arguments Value Note Author(s) Examples

Description

Performs general formatting of effect tables from 'lm' suitable for basic printing. This includes merging estimates and confidence intervals, rounding, and optionally improving the display of factor and logical columns (using a colon and space, instead of just concatenating them).

Usage

1
2
3
4
5
formatEffectTable(object
                  , level = 0.95
                  , estDigits = 2
                  , pDigits = 4
                  , cleanFactors = TRUE)

Arguments

object

A fitted model object from 'lm'

level

The confidence level to be returned

estDigits

The number of digits to be displayed for the estimate and confidence thresholds

pDigits

The number of digits to be displayed for the p-values

cleanFactors

Logical. Should the parameter names for factors be cleaned by separating the parameter from the value with a colon and a space, or not. (This option may lead to issues with merging if set to 'TRUE'.)

Value

A data.frame formatted ready to be displayed (e.g. by 'kable')

Note

Note that "NA" values are silently dropped (they are not returned by 'summary.lm' in the coefficients table).

Author(s)

Mark Peterson

Examples

1
2
irisMod <- lm(Sepal.Length ~ ., data = iris)
formatEffectTable(irisMod)

rmdHelpers documentation built on May 1, 2019, 7:33 p.m.