Learn R Programming

kim (version 0.6.1)

capitalize: Capitalize a substring

Description

Capitalizes the first letter (by default) or a substring of a given character string or each element of the character vector

Usage

capitalize(x, start = 1, end = 1)

Value

a character string or a character vector

Arguments

x

a character string or a character vector

start

starting position of the susbtring (default = 1)

end

ending position of the susbtring (default = 1)

Examples

Run this code
capitalize("abc")
capitalize(c("abc", "xyx"), start = 2, end = 3)

Run the code above in your browser using DataLab