R/get_modelRunAttributes.R

Defines functions get_modelRunAttributes get_ruleset

get_modelRunAttributes <- function(input_dmi, ruleset, tbl_atts)
{
  ruleset <- get_ruleset(ruleset)

  atts = paste0(
      "Ruleset: ", ruleset, "; ",
      "Input DMI: ", input_dmi, "; ",
      "MRM Config: ", tbl_atts$mrm_config_name, "; ",
      "MRM Desc: ", tbl_atts$description, ";"
    )

  atts
}

# gets just the ruleset name from a file path to the ruleset
get_ruleset <- function(ruleset)
{
  # split on / or \\
  tmp <- simplify2array(stringr::str_split(ruleset, "(/|\\\\)"))
  tmp <- tmp[nrow(tmp),]

  tmp
}
BoulderCodeHub/rdf2rise documentation built on Nov. 22, 2019, 5:29 p.m.