APA_p: APA style options for _p_ values

Description Usage Arguments Value P values Examples

Description

APA_p takes a number (numeric or character) and returns it with appropriate APA formatting, with options for print-friendly labelling.

Usage

1
APA_p(stat, digit = 3, not_range = TRUE, rmd_format = TRUE)

Arguments

stat

A number, supplied as a numeric or character value.

digit

How many significance digits? Default = 3

Passed to formattable with options format = "f" and digits = digit.

not_range

Should full p values be returned instead of significance ranges? Default is TRUE. FALSE returns numbers with greater than/ less than indicators and no leading zeros. See P values.

rmd_format

Should p value be return with a Latex/rMarkdown-friendly label and equal sign prepended (e.g., "\\textitp $=$ .012"). Default is TRUE.

Value

stat as a string with APA formatting and/or other options applied.

P values

For p values less than .001, APA recommends using p < .001. Otherwise, full p values should be used, rounded to two or three decimal places, and without a leading zero (e.g., p = .003) when reporting p values in text, or as values in a range (for tables, etc.; e.g., p < .05). See snip for details about leading and trailing zeros.

Examples

1
# lapply(runif(n = 100, min = 0.00003, max = .99), APA_p, rmd_format = TRUE)

darrellpenta/APAstyler documentation built on May 14, 2019, 6:10 p.m.