top_emojis: Identifies the most common emojis in a text or collection of...

View source: R/top_emojis.R

top_emojisR Documentation

Identifies the most common emojis in a text or collection of texts.

Description

Identifies the most common emojis in either an input character vector or an input data frame containing emoji counts (e.g., from the count_emojis function).

Usage

top_emojis(text = NULL, emoji_counts = NULL)

Arguments

text

An optional character vector.

emoji_counts

An optional argument containing a data frame with nrow = number of elements in the input character vector and ncol = number of emojis currently supported by the package (see all_emojis). This data frame can be produced by the count_emojis function.

Value

Proudces a data frame with the number of occurrences of each emoji present in the input vector, sorted in descending order.

Author(s)

Rebecca Godard

References

https://unicode.org/emoji/charts/full-emoji-list.html

Examples

top_emojis(c("Hello \U001f600", "How are you today? \U001f600",
"I am feeling happy \U001f600", "I am feeling sad \U001f622"))
Note: Emojis are not supported by the software used to generate package manuals, so
the unicode character codes are used instead.

rjgodard/emojis documentation built on Nov. 29, 2024, 7:16 p.m.