prettyalpha: Pretty Printing of psych::alpha() Results

View source: R/prettyalpha.R

prettyalphaR Documentation

Pretty Printing of psych::alpha() Results

Description

Results from psych::alpha() get messed up when alpha() is called within a for loop within an R Markdown document with the chunk option results = "asis". This function is an alternative to alpha() that can print out a pretty output in such situations.

Usage

prettyalpha(alphaobj, dp = 2, align = "c", ...)

Arguments

alphaobj

Summary object from executing psych::alpha().

dp

Defaults to 3. Number of decimal points for all numeric values.

align

Defaults to "c", which stands for centered. Adjusts the alignment of text within table cells. Works the same way as kable().

...

Additional arguments passed onto kable().

Examples

myalpha <- alpha(HolzingerSwineford1939[,7:15])
prettyalpha(myalpha)

Aaron0696/aaRon documentation built on July 27, 2023, 2:05 p.m.