uses a simple Regular Expression (RegEx) to clear most emojis from the text variable. Attempts to handle emojis which are joined together - like family emojis, and 'edited emojis' like those with skin tones etc. set
Examples
emojis <- data.frame(
text = c("Hello π World",
"Family: π¨βπ©βπ§βπ¦",
"Coding π¨π½βπ»",
"Flags π³οΈβπ πΊπΈ",
"Weather βοΈ βοΈ βοΈ")
)
emojis
#> text
#> 1 Hello π World
#> 2 Family: π¨βπ©βπ§βπ¦
#> 3 Coding π¨π½βπ»
#> 4 Flags π³οΈβπ πΊπΈ
#> 5 Weather βοΈ βοΈ βοΈ
# using limpiar_remove_emojis() to remove them entirely:
limpiar_remove_emojis(emojis, text)
#> text
#> 1 Hello World
#> 2 Family: βββ
#> 3 Coding β
#> 4 Flags β
#> 5 Weather