columnIndexOf.Rd
Indices of data frame columns identified by name.
columnIndexOf(x, d, regexp = TRUE)
x | name(s) of columns to be searched for |
---|---|
d | data frame whose columns shall be searched |
regexp | If TRUE, |
indices of requested columns
# Find indices of 'Petal.Length' and 'Sepal.Length' columns in the # 'iris' data: columnIndexOf(c('Sepal.Length','Petal.Length'),iris)#> [1] 1 3#> [1] 1 3