Skip to contents

Return the First Parts of a chars Object

Usage

# S3 method for class 'chars'
head(x, ...)

Arguments

x

a chars object.

...

further arguments passed to or from other methods.

Value

the first (n) elements of a chars object as a chars object.

Examples

head(chars("abcdefhgi"))
#> [1] "abcdef"

head(chars("javascript"), 4)
#> [1] "java"