rRedundantPredictors: Remove redundant predictors

Description Usage Arguments Value Examples

View source: R/dpreproc.R

Description

Reduces the number of predictors by eliminating those with near-zero variance and from pairs that have high correlation (>= 90%) eliminate one of the two predictors.

Usage

1

Arguments

data

numerical matrix with predictors as rows and samples as columns

Value

numerical matrix

Examples

1
2
3
4
5
6
nycfl = nycflights13::flights
# We won´t use those non numerical predictors
nycfl = na.omit(nycfl[,-c(1,10,12,13,14,19)])
ncol(nycfl)
nycfl2 <- t(rRedundantPredictors(t(nycfl)))
ncol(nycfl2)

carmen-maria-hernandez/coexnetwork documentation built on Dec. 19, 2021, 1:53 p.m.