Skip to contents

[Superseded]

With format_ttest() you can format t-tests generated from t.test() and wilcox.test() output. This is now an internal function superceded by format_stats(), which we recommend using instead.

Usage

format_ttest(x, digits, pdigits, pzero, full, italics, dfs, mean, type)

Arguments

x

An htest object

digits

Number of digits after the decimal for means, confidence intervals, and test statistics

pdigits

Number of digits after the decimal for p-values, ranging between 1-5 (also controls cutoff for small p-values)

pzero

Logical value (default = FALSE) for whether to include leading zero for p-values

full

Logical value (default = TRUE) for whether to include means and confidence intervals or just test statistic and p-value

italics

Logical value (default = TRUE) for whether p label should be italicized

dfs

Formatting for degrees of freedom ("par" = parenthetical, "sub" = subscript, "none" = do not print degrees of freedom)

mean

Formatting for mean label ("abbr" = M, "word" = Mean)

type

Type of formatting ("md" = markdown, "latex" = LaTeX)

Value

A character string of statistical information formatted in Markdown or LaTeX.

See also

Other functions for printing statistical objects: format_bf(), format_corr(), format_stats(), format_stats.BFBayesFactor(), format_stats.easycorrelation(), format_stats.htest()

Examples

format_stats(t.test(formula = mtcars$mpg ~ mtcars$vs))
#> [1] "_M_ = -7.9, 95% CI [-11.5, -4.4], _t_(22.7) = -4.7, _p_ < .001"