R/format_label.R

Defines functions format_label

format_label <- function(x) {

  if (fcaR_options("escape_")) {

    regex <- "([#%&_])"

  } else {

    regex <- "([#%&])"

  }

  x %>%
    stringr::str_replace_all(
      regex,
      "\\\\\\1"
    )

}
Malaga-FCA-group/fcaR documentation built on May 6, 2023, 1:45 p.m.