Learn R Programming

apaStyle (version 0.3)

apa.cor.matrix: Generic method to generate a correlation matrix with values

Description

Generic method to generate a correlation matrix with values

Usage

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

Run this code
# 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"
)

Run the code above in your browser using DataLab