R/score.R

#' Score
#'
#' @param x a boolean
#'
#' @return 1 if TRUE, -1 if FALSE
score <- function(x) {
  assertive::assert_is_a_bool(x)
  as.integer((x - 0.5) * 2)
}
UBESP-DCTV/rexams documentation built on May 16, 2019, 11:04 a.m.