targetCorrelations: Correlations between a target variable and all other...

Description Usage Arguments Value

Description

This function will return the correlation between a specfied target variable and all other variables in the same data frame. Uses cor to calculate correlations.

Usage

1
2
targetCorrelations(df, target, N = NULL, use = "everything",
  method = c("pearson", "kendall", "spearman"))

Arguments

df

Dataframe containing all variables

target

Name of the target variable

N

Default NULL will return all correlations. Change to e.g. N = 5 to return only the 5 highest absolute correlations

use

Same as use in the cor function

method

Same as method in the cor function

Value

Named vector of the correlations, ordered by absolute highest to lowest.


elastacloud/automatic-data-explorer documentation built on May 8, 2019, 9:29 a.m.