pvalue: Writes nicely formatted p-values

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Prints out APA style p-values

Usage

1
pvalue(x)

Arguments

x

a object of class numeric

Details

Returns the p-value round at 3 digits or <.001 if necessary

Value

a string

Author(s)

Marcello Gallucci

Examples

1
2
3
d<-data.frame(cbind(y=rnorm(100,0,1),x=rnorm(100,0,1)))
p<-summary(lm(y~x,data=d))$coefficients[1,4]
pvalue(p)

mcfanda/StatWriter documentation built on May 22, 2017, 1:11 a.m.