Generic method to generate a correlation matrix with values

Description

Generic method to generate a correlation matrix with values

Usage

1
apa.cor.matrix(data = data.frame(), position = "lower")

Arguments

data

Raw dataset with variables.

position

(optional) Specify whether the correlations should be displayed in the upper, or lower diagonal of the table.

Value

apa.cor.matrix object; a list consisting of

succes

message in case of an error

data

the data with correlation values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Use apa.cor.matrix function
apa.cor.matrix(
  data = data.frame(
    rnorm(100, mean = 0, sd = 1),
    rnorm(100, mean = 0, sd = 1),
    rnorm(100, mean = 0, sd = 1),
    rnorm(100, mean = 0, sd = 1)
  ),
  position = "upper"
)