Rfast (version 1.7.3)

Index of the columns of a data.frame which are factor variables: Index of the columns of a data.frame which are factor variables

Description

Index of the columns of a data.frame which are factor variables.

Usage

which_isFactor(x)

Arguments

x
A data.frame where some columns are expected to be factor variables.

Value

A vector with the column indices which are factor variables. If there are no factor variables it will return an empty vector.

Details

The function is written in C++ and this is why it is very fast.

See Also

nth, Match

Examples

Run this code
which_isFactor(iris)

Run the code above in your browser using DataCamp Workspace