Learn R Programming

charcuterie (version 0.0.4)

is_punct: Is a Character Punctuation?

Description

Compares against the regex group [[:punct:]].

Usage

is_punct(x)

Value

A boolean vector indicating whether each element of x is considered as punctuation.

Arguments

x

A vector of characters.

Examples

Run this code
is_punct(chars("I can haz?"))

Filter(Negate(is_punct), chars("abc,123;$*%?"))

Run the code above in your browser using DataLab