R/get_n.R

Defines functions get_n

get_n <- function(n = NULL, ...){
  n <- unique(c(n ,unlist(sapply(list(...), get_n_single))))
  if(length(n) > 1){
    stop("All sets of covariates must have the same number of observations")
  } else {
    if(length(n) == 0) stop("No covariates supplied")
  }
  return(n)
}

Try the distfreereg package in your browser

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

distfreereg documentation built on April 4, 2025, 12:30 a.m.