R/check_args.R

Defines functions .check_vect_args

Documented in .check_vect_args

#' Will return TRUE if the condition is NOT met. Condition is that the lengths 
#' of all vector arguments must be an iteger multiple of the the length of the
#' longer vector.

.check_vect_args <- function(arg_ls) {
  arg_lngth <- lengths(arg_ls)
  arg_tab   <- table(arg_lngth)
  n_lngths  <- length(arg_tab)
  x_lnghts  <- as.numeric(names(arg_tab))
  any((x_lnghts[length(x_lnghts)] %% x_lnghts) != 0)
}
AlexCast/rho documentation built on Dec. 14, 2021, 9:47 a.m.