Learn R Programming

charcuterie (version 0.0.4)

[.chars: Extract or Replace Parts of a chars Object

Description

Extract or Replace Parts of a chars Object

Usage

# S3 method for chars
[(x, ...)

Value

the extracted parts of a chars object, or a chars object with replacements performed.

Arguments

x

a chars object.

...

further arguments passed to or from other methods.

Examples

Run this code
s <- chars("censor")
s[2:5]
s[2:5] <- "X"
s

Run the code above in your browser using DataLab