R/check_beast2_installed.R

Defines functions check_beast2_installed

Documented in check_beast2_installed

#' Checks if BEAST2 is installed
#'
#' Will \link{stop} if not.
#' @return nothing
#' @author Richèl J.C. Bilderbeek
#' @examples
#' # Check cleanup by other functions
#' beastier::check_empty_beaustier_folders()
#'
#' # Need to check if it is installed, else it will give the desired error
#' if (beastier::is_beast2_installed()) {
#'   check_beast2_installed()
#' }
#'
#' @export
check_beast2_installed <- function() {
  if (!beastier::is_beast2_installed()) {
    stop("BEAST2 not installed. Tip: use 'beastierinstall::install_beast2()'")
  }
  invisible(NULL)
}
richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.