Index of the columns of a data.frame which are a specific type | R Documentation |
Index of the columns of a data.frame which are a specific type.
which.is(x,method="factor")
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". |
The function is written in C++ and this is why it is very fast.
A vector with the column indices which are factor variables. If there are no factor variables it will return an empty vector.
Manos Papadakis <papadakm95@gmail.com>
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.
nth, Match
res<-which.is(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.