check_raw_stats {Infusion} | R Documentation |
Check linear dependencies among raw summary statistics
Description
A convenient wrapper function for caret::findLinearCombos
, allowing to detect linear dependencies among the statistics,
and optionally to remove variables that induce them.
Usage
check_raw_stats(x, statNames, remove = FALSE, verbose = interactive())
Arguments
x |
data frame (particularly inheriting from class |
statNames |
Character vector: variables among which dependencies are sought. Must belong column names of |
remove |
Boolean: whether to return |
verbose |
Boolean: whether to display some messages. |
Value
Return type depends on the availability of the caret package, and on the remove
argument, as follows. if remove=TRUE
, an object of the same class as x
is returned (with redundant columns removed). If remove=FALSE
, either the caret package is available, in which case a list is returned with the same structure as the return value of caret::findLinearCombos
but with column indices replaced by column names; or a message pointing that caret is not available is returned (and another is printed, only once per session).