R/is_sampleLeng.R

is.sampleLeng <- function(x) { # test for sampleLength
  if(!is.numeric(x)){stop("The sampleLength you entered is not numeric!")}
  if(!is.na(x[2])){stop("The sampleLength you entered is a vector!")}
  if(!(x>0)){stop("The sampleLength you entered is zero or less!")}
  if(!(x<1)){stop("The sampleLength you entered is one or more!")}
}

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.