Learn R Programming

creditmodel (version 1.3.1)

n_char: The length of a string.

Description

Returns the number of "code points", in a string.

Usage

n_char(string)

Arguments

string

A string.

Value

A numeric vector giving number of characters (code points) in each element of the character vector. Missing string have missing length.

Examples

Run this code
# NOT RUN {
n_char(letters)
n_char(NA)
# }

Run the code above in your browser using DataLab