Learn R Programming

apa (version 0.3.4)

chisq_apa: Report Chi-squared test in APA style

Description

Report Chi-squared test in APA style

Usage

chisq_apa(
  x,
  print_n = FALSE,
  format = c("text", "markdown", "rmarkdown", "html", "latex", "latex_math", "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", "latex_math", "docx" or "plotmath".

info

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

print

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

Examples

Run this code
# Example data from ?chisq.test
m <- rbind(c(762, 327, 468), c(484, 239, 477))

chisq_apa(chisq.test(m))

Run the code above in your browser using DataLab