Learn R Programming

Hmisc (version 4.6-0)

capitalize: capitalize the first letter of a string

Description

Capitalizes the first letter of each element of the string vector.

Usage

capitalize(string)

Arguments

string

String to be capitalized

Value

Returns a vector of charaters with the first letter capitalized

Examples

Run this code
# NOT RUN {
capitalize(c("Hello", "bob", "daN"))
# }

Run the code above in your browser using DataLab