R/util_backtickQuote.R

Defines functions util_backtickQuote

Documented in util_backtickQuote

#' utility function to set string in backticks
#'
#' Quote a set of variable names with backticks
#'
#' @param x variable names
#'
#' @return quoted variable names
#'
util_backtickQuote <- function(x) {
  na <- is.na(x)
  res <- paste0("`", x, "`")
  res[res == "``"] <- ""
  res[na] <- NA
  res
}

Try the dataquieR package in your browser

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

dataquieR documentation built on July 26, 2023, 6:10 p.m.