R/assign.subject.id.R

assign.subject.id <- function(null){
  
  if(!('SUBID' %in% colnames(null))){
    msg <- 'data frame \'data\' should have a column \'SUBID\''
    stop(msg)
  }
  
  id <- which(colnames(null) == 'SUBID')
  rownames(null) <- as.character(null$SUBID)
  null <- null[, -id, drop = FALSE]
  null
  
}

Try the ARTP2 package in your browser

Any scripts or data that you put into this service are public.

ARTP2 documentation built on May 2, 2019, 3:38 p.m.