R/is_decay.R

is.decay <- function(x, tol = .Machine$double.eps^0.5){  # test for decay parameter
  if(!is.numeric(x)){stop("The decay you entered is not numeric!")}
  if(!is.na(x[2])){stop("The decay you entered is a vector!")}
  if(!(x>=0)){stop("The decay you entered is less than zero!")}
}

Try the TeachNet package in your browser

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

TeachNet documentation built on May 2, 2019, 7 a.m.