R/assign.subject.id.R

Defines functions assign.subject.id

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
  
}
zhangh12/ARTP3 documentation built on Aug. 16, 2019, 7:39 p.m.