Learn R Programming

emoji (version 15.0)

flag: Insert Flag Emojis

Description

Insert Flag Emojis

Usage

flag(name, return_key = FALSE)

Value

Character vector of emojis.

Arguments

name

Character denoting the place of the flag. Set return_key = TRUE to get full list of allowed names.

return_key

Logical, set to TRUE to get full list of allowed names.

Details

This function is vectorized. The input is being normalized before matching which will hopefully lead to lower friction and easier matching. Punctuation is being removed and case is not taken into consideration when matching. You can run flag(return_key = TRUE) to get full list of allowed names.

Examples

Run this code
flag(c("Vietnam", "Greenland", "Estonia", "Denmark", "united states"))

flag(c("US Virgin Islands", "U.S. Virgin Islands", "u.s. virgin islands"))

Run the code above in your browser using DataLab