which.is: Index of the columns of a data.frame which are a specific...

View source: R/which.is.R

Index of the columns of a data.frame which are a specific typeR 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)

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.