Report Chi-squared test in APA style

Share:

Description

Report Chi-squared test in APA style

Usage

1
2
chisq_apa(x, print_n = FALSE, format = c("text", "markdown", "rmarkdown",
  "html", "latex", "docx", "plotmath"), info = FALSE, print = TRUE)

Arguments

x

A call to chisq.test

print_n

Logical indicating whether to show sample size in text

format

Character string specifying the output format. One of "text", "markdown", "rmarkdown", html, "latex", "docx" or "plotmath".

info

Logical indicating whether to print a message on the used test (default is FALSE)

print

Logical indicating wheter to print the formatted output via cat (TRUE, default) or return as character string.

Examples

1
2
3
4
# Example data from ?chisq.test
m <- rbind(c(762, 327, 468), c(484, 239, 477))

chisq_apa(chisq.test(m))