R/getcol.R

Defines functions getcol

Documented in getcol

#' determine the column number that has the column name

#' @export

getcol=function(mymat,coln){
  #given a data.frame mymat, determine the column number that has the column name = coln
  #helpful for going between column names and actual column numbers
  #example getcol(mydata,"age") would give the # of column that contains age in mydata
  return(which(names(mymat)==coln))}
AndrewH6/BioCG documentation built on Dec. 17, 2021, 8:50 a.m.