zero_order_corr: Zero-order correlation table

Description Usage Arguments Value Examples

View source: R/zero_order_corr.r

Description

This function creates a zero-order correlation table. A vector with variables names can be included in order to replace the first column. Further arguments allow to transform the table into a APA-ready print format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
zero_order_corr(
  data,
  var_names = NULL,
  rm.upper_tri = TRUE,
  print = FALSE,
  digits = 2,
  sig = FALSE,
  descriptives = TRUE,
  ...
)

Arguments

data

A data frame containing all variables that should be investigated.

var_names

A vector with fitting variable names.

rm.upper_tri

Should the upper triangle be omitted?

print

A logical value indicating whether the table should be formatted according to APA guidelines.

digits

A number specifying how many digit should be printed.

sig

Logical value indicating whether stars should be printed when the effect is significant at alpha = .05. Defaults to true when print = TRUE.

descriptives

Logical value indicating whether the mean and standard deviations of all variables should be included as second and third column.

...

Further arguments that can be passed to corr.test() (e.g., alternative methods to compute the bivariate correlations by specifying method = "spearman").

Value

A data frame.

Examples

1
2
3
4
5
# Default
zero_order_corr(mtcars)

# Customized for printing
zero_order_corr(mtcars, print = T, digits = 3, sig = TRUE)

masurp/pmstats documentation built on Oct. 6, 2020, 9:24 p.m.