R/1.1.checkResponseRequirements.R

Defines functions checkResponseRequirements

checkResponseRequirements <- function(response) {
  if (dim(response)[2] > 1) {
    stop("Response variable must be one-dimensional!")
  } else if (any(is.na(response$value))) {
    stop("Response variable shouldn't have NA values!")
  } else if (typeof(response$value) == "character" | typeof(response$value) == "logical") {
    stop("Response variable shouldn't be character or logical!")
  }

  return(NULL)
}

Try the Mmcsd package in your browser

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

Mmcsd documentation built on March 31, 2023, 7:23 p.m.