R/is_mrca_prior_with_distr.R

Defines functions is_mrca_prior_with_distr

Documented in is_mrca_prior_with_distr

#' See if x is one MRCA prior with a distribution
#' @param x the object to be tested
#' @return TRUE if x is one MRCA prior with a distribution,
#'   FALSE otherwise
#' @author Richèl J.C. Bilderbeek
#' @export
is_mrca_prior_with_distr <- function(
  x
) {
  if (is_one_na(x)) return(FALSE)
  if (!is_mrca_prior(x)) return(FALSE)
  is_distr(x$mrca_distr)
}
richelbilderbeek/beastscriptr documentation built on Nov. 5, 2023, 8:36 p.m.