corAPA: Make a Correlation Matrix Suitable for an APA Publication

View source: R/corAPA.R

corAPAR Documentation

Make a Correlation Matrix Suitable for an APA Publication

Description

This function creates a correlation matrix, given a data frame of variables, and outputs it to the viewer in HTML Format to facilitate copying and pasting. It uses stars to indicate significance.

Usage

corAPA(
  x,
  missingMethod = c("pairwise", "complete"),
  format = c("kable", "df"),
  descriptives = T,
  removeTriangle = c("upper", "lower"),
  decimals = 2,
  cutoffs = c(0.001, 0.01, 0.05)
)

Arguments

x

a matrix containing the data

missingMethod

how missing observations are handled: "pairwise" by default. "complete" selects only complete cases

format

returns as either a "Kable" or a data frame

descriptives

adds means and standard deviations

removeTriangle

remove upper or lower triangle

decimals

number of decimals in the correlation matrix

cutoffs

a vector of 3 cutoffs values. p values less than cutoff 1 get 3 stars, those less than cutoff 2 get 2 stars, and those less than cutoff 1 get one star

result

the format of the output

Value

The correlation matrix in the desired format


michaelasher/asherR documentation built on July 5, 2023, 8:55 p.m.