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

}
neuroimaginador/fcaR documentation built on May 3, 2024, 12:25 a.m.