Learn R Programming

insight (version 0.19.11)

format_capitalize: Capitalizes the first letter in a string

Description

This function converts the first letter in a string into upper case.

Usage

format_capitalize(x, verbose = TRUE)

Value

x, with first letter capitalized.

Arguments

x

A character vector or a factor. The latter is coerced to character. All other objects are returned unchanged.

verbose

Toggle warnings.

Examples

Run this code
format_capitalize("hello")
format_capitalize(c("hello", "world"))
unique(format_capitalize(iris$Species))

Run the code above in your browser using DataLab