fapa: Format a number according to the APA guidelines

Description Usage Arguments Value Author(s) See Also

View source: R/fapa.R

Description

A function to format a given number according to the APA guidelines, i.e. removing the 0 before the decimal point, and rounding the number to two digits. If the number to format is a p value, then add 'p = ' or 'p < .05'. The output can be directly used in a Knitr/Sweave document.

Usage

1
fapa(nbr, p = FALSE)

Arguments

nbr

A number to format.

p

A boolean index to precise if the number to format is a p value.

Value

Return a string reporting an inline number results according to the APA guideline.

Author(s)

Guillaume T. Vallet gtvallet@gmail.com, University of de Montreal (Canada);

See Also

ftt, fmsd, faov


Cogitos/statxp documentation built on March 22, 2021, 6:38 a.m.