formatEffectTable {rmdHelpers} | R Documentation |
Format an effect table
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
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
irisMod <- lm(Sepal.Length ~ ., data = iris)
formatEffectTable(irisMod)