Learn R Programming

Hmisc (version 5.1-2)

capitalize: capitalize the first letter of a string

Description

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

Usage

capitalize(string)

Value

Returns a vector of charaters with the first letter capitalized

Arguments

string

String to be capitalized

Author

Charles Dupont

Examples

Run this code
capitalize(c("Hello", "bob", "daN"))

Run the code above in your browser using DataLab