R/checkPars.R

Defines functions checkPars

checkPars<-function(x,n) {
if ((length(x) > 1) && (length(x) != n))
	stop(paste("length of",deparse(substitute(x)),"vector does not match number of variables !"))
if (length(x) == 1) return(rep(x,n))
return(x)
}

Try the homals package in your browser

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

homals documentation built on June 10, 2022, 5:09 p.m.