R/lambda.check.R

lambda.check <-
  function (lambda)
  {
    if (is.null (lambda))  ## check for existence of attribute 'lambda'
      stop ("Tuning parameter lambda missing \n")

    if (any (lambda < 0))   ## check for non-negativity of lambda
      stop ("lambda must be non-negative \n")
  }

Try the CHEMIST package in your browser

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

CHEMIST documentation built on May 1, 2023, 5:18 p.m.