R/err.WN.vec.dim.R

Defines functions err.WN.vec.dim

Documented in err.WN.vec.dim

##check if the input arguments are atomic vectors with whole numbers
err.WN.vec.dim <- function(v, n){
  if(!is.atomic(v) || !is.vector(v)){
    stop('argument has to be an atomic vector')
  }
  if(!all(v%%1 == 0)){
    stop('argument has to be an integer vector')
  }
  if(length(v) != n){
    stop(paste('dimension of input vector needs to be', n))
  }
  return(NULL)
}
Chitran1987/StatsChitran documentation built on Feb. 23, 2025, 8:30 p.m.