Learn R Programming

manymodelr (version 0.3.9)

get_var_corr_: Get correlations for combinations

Description

Get correlations for combinations

Usage

get_var_corr_(
  df,
  subset_cols = NULL,
  drop_columns = c("character", "factor"),
  ...
)

Value

A data.frame object with combinations.

Arguments

df

A `data.frame` object for which correlations are required in combinations.

subset_cols

A `list` of length 2. The values in the list correspond to the comparison and other_Var arguments in `get_var_corr`. See examples below.

drop_columns

A character vector specifying column classes to drop. Defaults to c("factor","character")

...

Other arguments to `get_var_corr`

Details

This function extends get_var_corr by providing an opportunity to get correlations for combinations of variables. It is currently slow and may take up to a minute depending on system specifications.

Examples

Run this code
get_var_corr_(mtcars,method="pearson")
#use only a subset of the data.
 get_var_corr_(mtcars,
             subset_cols = list(c("mpg","vs"),
                                c("disp","wt")),
             method="spearman",exact=FALSE)

Run the code above in your browser using DataLab