Identify Non-Constant Columns in a Data Frame
nonConstInd(data, tol = 1e-08, na.rm = FALSE)
An integer vector containing the indices of the non-constant columns in the data frame. If all columns are constant, an empty vector is returned.
A data frame in which columns will be checked for constant values. Columns can be of any type (numeric, integer, logical, or factor).
A numeric tolerance value (default is 1e-8
) that applies to
numerical columns.
A logical value. If FALSE
(default), missing values are
retained during the check.