R/checkfornumber.R

Defines functions checkfornumber

Documented in checkfornumber

checkfornumber <-
function(x, name)
 {
  if ((!inherits(x, "integer") && !inherits(x, "numeric")) || length(x) > 1)
     stop(paste("if '", name, "' is provided, it must be a single number", sep = ""))
 }

Try the tlm package in your browser

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

tlm documentation built on May 2, 2019, 2:11 p.m.