Skip to contents

Remove highly correlated variables from a data.frame using the corrp functions outputs and the caret package function findCorrelation.

Usage

corr_rm(df, c, ...)

# S3 method for clist
corr_rm(
  df,
  c,
  col = c("infer.value", "stat.value"),
  isig = TRUE,
  cutoff = 0.75,
  ...
)

# S3 method for list
corr_rm(
  df,
  c,
  col = c("infer.value", "stat.value"),
  isig = TRUE,
  cutoff = 0.75,
  ...
)

# S3 method for cmatrix
corr_rm(df, c, cutoff = 0.75, ...)

# S3 method for matrix
corr_rm(df, c, cutoff = 0.75, ...)

Arguments

df

\[data.frame(1)]
input data frame.

c

\[clist(1) | cmatrix(1)]
correlation list output from corrp or correlation matrix output from corr_matrix.

...

Additional arguments (TODO).

col

\[character(1)]
choose the column to be used in the correlation matrix

isig

\[logical(1)]
values that are not statistically significant will be represented by NA or FALSE in the correlation matrix.

cutoff

\[numeric(1)]
A numeric value for the pair-wise absolute correlation cutoff. The default values is 0.75.

Author

Igor D.S. Siciliani