style.apa.chisq: Formats a Pearson's Chi-squared Test for Count Data

Description Usage Arguments Details Value See Also Examples

View source: R/style_apa.R

Description

This style functions takes a chi-squared test (htest class) from chisq.test and transforms it into a formatted character vector. Statistics are printed optionally (not by default).

Usage

1
style.apa.chisq(x, print.n = TRUE, n.name = "N")

Arguments

x

a list. First item must be a chi-squared test (htest class) from chisq.test. All other list items will be ignored.

print.n

a logical, indicating whether number of participants is printed.

n.name

a character, giving the name or letter for the number of participants

Details

Please note that this is a internal style function. It is called from pprint and not exported to user namespace. Usually pprint determines the correct style function automatically, but you can define the style function by using the format argument of pprint (pass the name of this function without style.apa. prefix). Additionally you can pass the arguments listed in this documentation to pprint.

Argument x of this function expects a list. Be aware that you do not have to pass a list to pprint or pull.pubprint – these functions will convert your arguments. This is only necessary if you want to pass additionally information to the internal style functions (see vignette for examples).

Value

character vector with a formatted character vector.

See Also

chisq.test

Other APA.style.functions: style.apa.anova, style.apa.bartlett, style.apa.character, style.apa.cor.test, style.apa.df, style.apa.fisher, style.apa.ks, style.apa.numeric, style.apa.p.value, style.apa.shapiro, style.apa.summary.aovlist, style.apa.summary.lm.beta.coeff, style.apa.summary.lm.coeff, style.apa.summary.lm.equation, style.apa.summary.lm.model, style.apa.t.test

Examples

1
2
3
4
5
x <- matrix(c(141,29,43,26,5,10,26,12,10), nc=3)

pprint(chisq.test(x), format = "chisq")
pprint(chisq.test(x), format = "chisq", n.name = "n")
pprint(chisq.test(x), format = "chisq", print.n = FALSE)

pubprint documentation built on May 29, 2017, 2:55 p.m.