kc_cor: Custom correlation matrix

View source: R/kc_cor.R

kc_corR Documentation

Custom correlation matrix

Description

Compute correlation matrix and display lower triangular and diagonal only.

Usage

kc_cor(data, corvar, df = TRUE)

Arguments

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

Value

Either a data frame or matrix of correlations.

Examples

## 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)

kennchua/kctools documentation built on Aug. 28, 2024, 8:37 a.m.