src/library/jsonlite/R/makesymbol.R

# Note: 'symbol' is the same thing as 'name' For some reason, as.name('') gives
# an error, even though it is needed sometimes. This is a workaround
makesymbol <- function(x) {
  if (missing(x) || nchar(x) == 0) {
    return(substitute())
  } else {
    as.name(x)
  }
}
r-lib/pkg documentation built on May 6, 2024, 3:04 p.m.