Skip to contents

Extract Modifiers from Emojis

Usage

emoji_modifier_extract(x)

Arguments

x

Characters, vector of emojis.

Value

list of character vectors.

Details

This function is vectorized. See emoji_modifiers for full list of modified emojis and their unmodified state.

Examples

waving_hands <- emojis$emoji[grepl("waving hand", emojis$name)]
waving_hands
#> [1] "πŸ‘‹"   "πŸ‘‹πŸ»" "πŸ‘‹πŸΌ" "πŸ‘‹πŸ½" "πŸ‘‹πŸΎ" "πŸ‘‹πŸΏ"

emoji_modifier_extract(waving_hands)
#> [[1]]
#> NULL
#> 
#> [[2]]
#> [1] "light skin tone"
#> 
#> [[3]]
#> [1] "medium-light skin tone"
#> 
#> [[4]]
#> [1] "medium skin tone"
#> 
#> [[5]]
#> [1] "medium-dark skin tone"
#> 
#> [[6]]
#> [1] "dark skin tone"
#> 

set.seed(1234)
emoji_sample <- sample(emojis$emoji, 10)
emoji_sample
#>  [1] "πŸ€·πŸ½β€β™€"       "πŸ‘©πŸΎβ€πŸ¦°"      "πŸ‹οΈβ€β™€"          "πŸ™‡πŸΎβ€β™‚"       "➑"          
#>  [6] "πŸ§‘πŸΎβ€πŸ€β€πŸ§‘πŸ»"  "πŸ§ŽπŸΌβ€β™‚β€βž‘"      "πŸ‘¨πŸΎβ€β€β€πŸ’‹β€πŸ‘¨πŸΏ" "πŸ€ΈπŸ»β€β™‚"       "πŸƒπŸΌβ€β™€β€βž‘"     

emoji_modifier_extract(emoji_sample)
#> [[1]]
#> [1] "medium skin tone"
#> 
#> [[2]]
#> [1] "medium-dark skin tone" "red hair"             
#> 
#> [[3]]
#> NULL
#> 
#> [[4]]
#> [1] "medium-dark skin tone"
#> 
#> [[5]]
#> NULL
#> 
#> [[6]]
#> [1] "medium-dark skin tone" "light skin tone"      
#> 
#> [[7]]
#> [1] "medium-light skin tone"
#> 
#> [[8]]
#> [1] "man"                   "man"                   "medium-dark skin tone"
#> [4] "dark skin tone"       
#> 
#> [[9]]
#> [1] "light skin tone"
#> 
#> [[10]]
#> [1] "medium-light skin tone"
#>