R/validate.lambda.R

validate.lambda <- function(summary.files, lambda){

  if(is.null(lambda)){
    lambda <- rep(1.0, length(summary.files))
  }

  if(!is.vector(lambda)){
    msg <- 'lambda should be a numeric vector'
    stop(msg)
  }
  # each summary file should has one inflation factor
  if(length(summary.files) != length(lambda)){
    msg <- 'Each summary file should has one inflation factor'
    stop(msg)
  }

  lambda

}

Try the SCAT package in your browser

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

SCAT documentation built on May 2, 2019, 1:24 p.m.