pwcorr: Replica of Stata's pwcorr function

Description Usage Arguments Value

View source: R/pwcorr.R

Description

Calculate and return a matrix of pairwise correlation coefficients. Returns significance levels if method == "pearson"

Usage

1
pwcorr(df, vars = NULL, method = "pearson", var_label_df = NULL)

Arguments

df

A data.frame or tibble.

vars

A character vector of numeric variables to generate pairwise correlations for. If the default (NULL), all variables are included.

method

One of "pearson", "kendall", or "spearman" passed on to "cor".

var_label_df

A data.frame or tibble with columns "variable" and "label" that contains display labels for each variable specified in vars.

Value

A data.frame displaying the pairwise correlation coefficients between all variables in vars.


describedata documentation built on Aug. 2, 2019, 5:05 p.m.