Learn R Programming

emoji (version 15.0)

emoji_subset: Keep strings containing an emoji, or find positions

Description

Keep strings containing an emoji, or find positions

Usage

emoji_subset(string, negate = FALSE)

emoji_which(string, negate = FALSE)

Value

A character vector

Arguments

string

input vector

negate

If TRUE, return non-matching elements.

See Also

Examples

Run this code
string <- c(letters[1:4], emoji_name[1:6])

emoji_subset(string) == emoji_name[1:6]
emoji_subset(string, negate = TRUE)

emoji_which(string)
emoji_which(string, negate = TRUE)

Run the code above in your browser using DataLab