Learn R Programming

thisutils (version 0.3.1)

capitalize: Capitalize the first letter of each word

Description

Capitalize the first letter of each word

Usage

capitalize(x, force_tolower = FALSE)

Arguments

x

A vector of character strings to be capitalized.

force_tolower

Whether to force the remaining letters to be lowercase.

Examples

Run this code
x <- c(
  "hello world",
  "hello World"
)
capitalize(x)

Run the code above in your browser using DataLab