kc_cor | R Documentation |
Compute correlation matrix and display lower triangular and diagonal only.
kc_cor(data, corvar, df = TRUE)
data |
The data frame to use |
corvar |
The variables to correlate |
df |
If TRUE then returns output as data frame; if FALSE returns a matrix |
Either a data frame or matrix of correlations.
## Not run:
kc_cor(mtcars, c(mpg, disp, wt)) # returns df correlations of mpg, disp, and wt
kc_cor(mtcars, starts_with("c"), df = FALSE) # returns matrix of correlations of vars beginning in c
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.