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, aconesa@cipf.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") 

maSigPro documentation built on Nov. 8, 2020, 6:51 p.m.