R/proper.R

#' proper
#'
#' \code{proper} Converts text string to proper case
#'
#' @author John James, \email{jjames@@DataScienceSalon.org}
#' @family Text Functions
#' @export
proper <- function(x) {
  s <- strsplit(x, " ")[[1]]
  paste(toupper(substring(s, 1,1)), substring(s, 2),
        sep="", collapse=" ")
}
DataScienceSalon/j2Rtools documentation built on May 28, 2019, 3:33 p.m.