emo (version 0.0.0.9000)

ji_filter: find emoji

Description

find emoji

Usage

ji_filter(...)

jitsu(...)

ji_set(...)

Arguments

...

set of filters, see details

Details

`...` can contain - bare symbols or strings, e.g. `cat` or `"cat"`. This will look for an exact word match in the name, the aliases or the keywords. - one sided formulas, e.g. `~cat`, `~"cat"`, `~regex("cat")`. The rhs of the formula is a regular expression suitable for [stringr::regex()] matched against the name - Any other call are just used verbatim in `filter`

`ji_filter` reworks the `...` as above and eventually returns the results of [dplyr::filter()] on the [jis] tibble.

`jitsu` selects one match at random between the results of `ji_filter`

`ji_set` makes a vector of all the selected emojis

Examples

Run this code
# NOT RUN {
# look these words in name, aliases and keywords
jitsu(cat,face)
jitsu(tears)
jitsu(poop)
jitsu(sad,cat)
jitsu(monkey)

# regex lookup
jitsu(~cat)
jitsu(~"^cat")
jitsu(~regex("^cat"))

# usual filter
jitsu(name == "cat")
jitsu(skin_tone == "light" )
jitsu(subcategory == "person-role", skin_tone == "medium-dark" )
jitsu(subcategory == "face-fantasy" )

# get all the results in a new tibble
ji_filter( monkey )
ji_filter( ~"^cat" )
ji_filter(hand, skin_tone == "light" )

# just get the emojis
ji_set( monkey )
ji_set( ~"^cat" )
ji_set(hand, skin_tone == "medium-dark" )


# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace