corAPA | R Documentation |
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.
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)
)
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 |
The correlation matrix in the desired format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.