R/clock_models_to_xml_operators.R

Defines functions clock_models_to_xml_operators

#' Create all clock models' operators' XML text
#' @inheritParams default_params_doc
#' @return a character vector of XML strings
#' @author Richèl J.C. Bilderbeek
#' @noRd
clock_models_to_xml_operators <- function(
  clock_models,
  mrca_priors = NA,
  tipdates_filename = NA
) {
  testit::assert(are_clock_models(clock_models)) # nolint beautier function

  text <- NULL
  for (i in seq_along(clock_models)) {
    clock_model <- clock_models[[i]]
    text <- c(
      text,
      clock_model_to_xml_operators(
        clock_model = clock_model,
        mrca_priors = mrca_priors,
        tipdates_filename = tipdates_filename
      )
    )
  }
  text
}
ropensci/beautier documentation built on March 12, 2019, 8:27 p.m.