pwcorr {describedata}R Documentation

Replica of Stata's pwcorr function

Description

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

Usage

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.


[Package describedata version 0.1.0 Index]