p.txt: p.txt

Description Usage Arguments Value Examples

View source: R/APA.R

Description

Formats a p-value as an APA style character vector. A p-value of .07 will return 'p<.1', a p-value of .04: P<.05 etc. If a p-value is not significant (p>.1) the p-value will be reported to 2 decimal places.

Usage

1
p.txt(p.val)

Arguments

p.val

(numeric) A numeric p-value (or vector thereof)

Value

p text

The p-value as an APA style character vector

Useful for inline r calls within the text of an Rmd. See knitr documentation for info on inline r code.

Examples

1
2
3
4
p.txt(.07)
# "p<.1"
p.txt(.04)
# "p<.05"

yogat3ch/HDA documentation built on Sept. 13, 2019, 8:54 p.m.