R/is.tpfit.R

Defines functions is.tpfit

Documented in is.tpfit

is.tpfit <-
function(object) {
  if(!is(object, "tpfit")) return(FALSE)
  if(!prod(c("coefficients", "prop", "tolerance") %in% names(object))) return(FALSE)
  if(length(names(object)) != 3) return(FALSE)
  if(!is.matrix(object$coefficients)) return(FALSE)
  if(!is.numeric(object$prop)) return(FALSE)
  if(!is.numeric(object$tolerance)) return(FALSE)
  return(TRUE)
}

Try the spMC package in your browser

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

spMC documentation built on May 3, 2023, 9:13 a.m.