R/CapWords.R

Defines functions CapWords

# Function to capitalize the first letter of each word
# Taken from Andrie from Stackoverflow

CapWords <- function(x) {
  x <- as.character(x)
  w <- strsplit(x, " ")[[1]]
  a <- paste(toupper(substring(w, 1,1)), substring(w, 2),
        sep="", collapse=" ")
  cap <- a
  return(cap)
}

Try the cmsafvis package in your browser

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

cmsafvis documentation built on Sept. 15, 2023, 5:15 p.m.