R/DAST.R

Defines functions score_DAST

Documented in score_DAST

score_DAST<-function(meas) {
  #' Score the 28 item Drug Abuse Screening Test
  #' 
  #' This is a scoring program for the 28 item Drug Abuse Screening Test.
  #' It accepts a data frame with 28 columns corresponding to responses
  #' on the measure (in order).
  #'
  #' \code{score_DAST} Returns a total symptom score.
  #' 
  #' @export
  
  reverse<-c(4,5,7)
  #Length Check
  stopifnot(length(meas)==28)
  #Reverse Scoring
  meas[,reverse]<-1-meas[,reverse]
  rowSums(meas)
}
halpclub/sdlabFunctions documentation built on Dec. 16, 2019, 12:34 p.m.