R/are_init_tree_priors.R

Defines functions are_init_tree_priors

Documented in are_init_tree_priors

#' Determine if x consists out of initialized tree_priors objects
#' @param x the object to check if it consists out of
#'   initialized tree_priors objects
#' @return TRUE if x, or all elements of x, are initialized tree_prior objects
#' @author Richèl J.C. Bilderbeek
#' @export
are_init_tree_priors <- function(
  x
) {
  if (!are_tree_priors(x)) return(FALSE)
  for (i in x) {
    if (!is_init_tree_prior(i)) return(FALSE)
  }
  TRUE
}
richelbilderbeek/beautier documentation built on April 4, 2024, 12:33 p.m.