position: Column position of a variable in a data frame

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1

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

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

mjnueda/maSigPro documentation built on Dec. 11, 2020, 12:21 a.m.