Learn R Programming

visdat (version 0.5.2)

gather_cor: (Internal) create a tidy dataframe of correlations suitable for plotting

Description

(Internal) create a tidy dataframe of correlations suitable for plotting

Usage

gather_cor(data, cor_method = "pearson",
  na_action = "pairwise.complete.obs")

Arguments

data

data.frame

cor_method

correlation method to use, from cor: "a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman": can be abbreviated."

na_action

The method for computing covariances when there are missing values present. This can be "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (default). This option is taken from the cor function argument use.

Value

tidy dataframe of correlations

Examples

Run this code
# NOT RUN {
gather_cor(airquality)

# }

Run the code above in your browser using DataLab