APA_stat: Format a statistic

Description Usage Arguments Value Examples

Description

APA_stat allows you to append your own labels to a statistic.

Usage

1
2
APA_stat(stat, pre_stat = NULL, post_stat = NULL, snip = FALSE,
  digit = 2, ...)

Arguments

stat

A number, supplied as a numeric or character value.

pre_stat

A string to be prepended to you number. Default is NULL.

post_stat

A string to be appended to your number. Default is NULL.

snip

Do you want to snip a leading zero from a number bounded by 1? Defaults to FALSE.

digit

How many significance digits (defaults to 2, which is suitable for many APA applications)? Passed to formattable.

...

Optional arguments to be passed to formattable or paste0

Value

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

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.