R/create_data_xml.R

Defines functions create_data_xml

Documented in create_data_xml

#' Create the \code{<data ..>} XML
#' @inheritParams default_params_doc
#' @return lines of XML text
#' @author Richèl J.C. Bilderbeek
#' @export
create_data_xml <- function(
  id,
  beast2_version
) {
  text <- NULL
  text <- c(text, "    <data")
  text <- c(text, paste0("id=\"", id, "\""))
  if (beast2_version == "2.6") {
    text <- c(text, "spec=\"Alignment\"")
  }
  text <- c(text, "name=\"alignment\">")
  if (beast2_version == "2.5") {
    text <- paste0(text, collapse = " ")
  }
  text
}

Try the beautier package in your browser

Any scripts or data that you put into this service are public.

beautier documentation built on Nov. 2, 2023, 5:08 p.m.