Index of the columns of a data.frame which are a specific type {Rfast}R Documentation

Index of the columns of a data.frame which are a specific type

Description

Index of the columns of a data.frame which are a specific type.

Usage

which.is(x,method="factor")

Arguments

x

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

method

A character value about the type. One of, "numeric","factor","integer","logical".

Details

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

Value

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

Author(s)

Manos Papadakis <papadakm95@gmail.com>

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

nth, Match

Examples

res<-which.is(iris)

[Package Rfast version 2.1.0 Index]