Learn R Programming

folda (version 0.1.0)

nonConstInd: Identify Non-Constant Columns in a Data Frame

Description

Identify Non-Constant Columns in a Data Frame

Usage

nonConstInd(data, tol = 1e-08, na.rm = FALSE)

Value

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.

Arguments

data

A data frame in which columns will be checked for constant values. Columns can be of any type (numeric, integer, logical, or factor).

tol

A numeric tolerance value (default is 1e-8) that applies to numerical columns.

na.rm

A logical value. If FALSE (default), missing values are retained during the check.