R/castlow_str.R

Defines functions castlow.str

Documented in castlow.str

#' Cast of a character string
#' @description The \code{castlow.str} function converts a word to lowercase,
#' without accents and spaces.
#' @param st character string
#' @return Returns the ASCII//TRANSLIT transcription of the word \code{st},
#' without accents, spaces and in lowercase letters.
#' @seealso \link[espadon]{castup.str}.
#' @examples
#' castlow.str (st = c("Right eye", "Left_Lung", "Right-Lung"))

#' @export
castlow.str <- function(st) {
  dum <- iconv(st, to = "ASCII//TRANSLIT")
  return(tolower(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.