t_apa {apa}R Documentation

Report t-Test in APA style

Description

Report t-Test in APA style

Usage

t_apa(
  x,
  es = "cohens_d",
  es_ci = FALSE,
  format = c("text", "markdown", "rmarkdown", "html", "latex", "latex_math", "docx",
    "plotmath"),
  info = FALSE,
  print = TRUE
)

Arguments

x

A call to t_test or t.test

es

Character specifying the effect size to report. One of "cohens_d" (default), "hedges_g" or "glass_delta" if x is an independent samples t-test. Ignored if x is a paired samples or one sample t-test (cohen's d is reported for these test).

es_ci

Logical indicating whether to add the 95 for Cohen's d (experimental; default is FALSE).

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

# Two independent samples t-test
t_apa(t_test(1:10, y = c(7:20)))

# Two dependent samples t-test
sleep2 <- reshape(sleep, direction = "wide", idvar = "ID", timevar = "group")
t_apa(t_test(Pair(extra.1, extra.2) ~ 1, sleep2))


[Package apa version 0.3.4 Index]