R/castup_str.R

Defines functions castup.str

Documented in castup.str

#' Cast of a character string
#' @description The \code{castup.str} function converts a word to upper case,
#' without accents and spaces.
#' @param st character string
#' @return Returns the ASCII//TRANSLIT transcription of the word \code{st},
#' without accents, spaces and in capitals.
#' @seealso \link[espadon]{castlow.str}.
#' @examples
#' castup.str (st = c("Right eye", "Left_Lung", "Right-Lung"))
#' @export
castup.str <- function(st) {
  dum <- iconv(st, to = "ASCII//TRANSLIT")
  return(toupper(gsub("[[:space:],_]", "", dum)))
}

Try the espadon package in your browser

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

espadon documentation built on May 8, 2026, 9:07 a.m.