position {maSigPro} | R Documentation

## Column position of a variable in a data frame

### Description

Finds the column position of a character variable in the column names of a data frame.

### Usage

    position(matrix, vari)

### Arguments

`matrix` | matrix or data.frame with character column names
`vari` | character variable

### Value

numerical. Column position for the given variable.

### Author(s)

Ana Conesa and Maria Jose Nueda, mj.nueda@ua.es

### Examples

    x <- matrix(c(1, 1, 2, 2, 3, 3),ncol = 3,nrow = 2)
    colnames(x) <- c("one", "two", "three")
    position(x, "one")

[Package maSigPro version 1.66.0 Index]