Formatter functions in the 'apa' package take the return value of a statistical test function, e.g. a call to chisq.test() and return a string formatted according to the guidelines of the APA (American Psychological Association).
apa's functions format output of statistical tests according to guidelines of the APA (American Psychological Association), ready to copy-and-paste into manuscripts.
The idea of such formatters was introduced in the schoRsch package. apa generalizes this idea by providing formatters for different output formats (text, Markdown, RMarkdown, HTML, LaTeX, docx and R's plotmath syntax).
Currently available formatters are:
Further miscellaneous functions:
apa(): A wrapper around the
*_apa()-functions for use in inline code in RMarkdown documents.
cohens_d_(): Calculate Cohen's d effect size (from raw data, t-test or statistical parameters). Also supports Hedge's g* and Glass's Δ.
t_test: A wrapper around
t.test()that includes the original data in its return list (in order to calculate the effect size in
t_apa()directly from the data).
1 pandoc is required for docx output and needs to be installed manually when not using RStudio (which ships pandoc).
The development version can be installed using: