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"
    )

}

Try the fcaR package in your browser

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

fcaR documentation built on July 27, 2026, 5:06 p.m.