powered by
position(matrix, vari)
x <- matrix(c(1, 1, 2, 2, 3, 3),ncol = 3,nrow = 2) colnames(x) <- c("one", "two", "three") position(x, "one")
Run the code above in your browser using DataLab