Title: | Easily Insert 'Emoji' |
---|---|
Description: | Makes it easy to insert 'emoji' based on either their name or a descriptive keyword. |
Authors: | Hadley Wickham [aut, cre], Romain François [aut], Lucy D'Agostino McGowan [aut], RStudio [cph] |
Maintainer: | Hadley Wickham <[email protected]> |
License: | GPL-3 |
Version: | 0.0.0.9000 |
Built: | 2024-11-17 04:55:15 UTC |
Source: | https://github.com/hadley/emo |
emoji version of time
clock(time)
clock(time)
time |
a 'POSIXct' object |
an emoji clock that is the closest to the given time
## Not run: clock( Sys.time() ) ## End(Not run)
## Not run: clock( Sys.time() ) ## End(Not run)
This uses the approximation described in the [lunar phase wikipedia page](https://en.wikipedia.org/wiki/Lunar_phase), i.e. the number of days since '1900/01/01' modulo the length of a synodic month ('29.530588853' days)
day_in_synodic_cycle(date)
day_in_synodic_cycle(date)
date |
a date |
## Not run: day_in_synodic_cycle( today() ) ## End(Not run)
## Not run: day_in_synodic_cycle( today() ) ## End(Not run)
Flag emoji
flag(pattern)
flag(pattern)
pattern |
pattern suitable for [stringr::str_detect] matched against the name of the flag |
If the pattern matches a single flag, the emoji ( with classes "flag" and "emoji" ) is returned
## Not run: flag( "^Fra" ) flag( "New Zealand" ) # name of all the flags if( require(dplyr) ){ emo::jis %>% filter( group == "Flags" ) %>% pull(name) } ## End(Not run)
## Not run: flag( "^Fra" ) flag( "New Zealand" ) # name of all the flags if( require(dplyr) ){ emo::jis %>% filter( group == "Flags" ) %>% pull(name) } ## End(Not run)
Find a single emoji
ji(keyword)
ji(keyword)
keyword |
Either name or keyword. If more than one emoji has the specified keyword, will pick one at random. |
emo::ji("banana") emo::ji("monkey")
emo::ji("banana") emo::ji("monkey")
emoji completion
ji_completion(token)
ji_completion(token)
token |
start of an emoji alias |
ji_completion( "key" )
ji_completion( "key" )
Vectorised over 'string'
ji_count(string)
ji_count(string)
string |
Input vector |
An integer vector
Vectorised over 'string'
ji_detect(string)
ji_detect(string)
string |
Input vector. Either a character vector, or something coercible to one |
A logical vector
[stringr::str_detect()]
vectorised over 'string'
ji_extract(string) ji_extract_all(string, simplify = FALSE)
ji_extract(string) ji_extract_all(string, simplify = FALSE)
string |
Input vector. |
simplify |
see [stringr::str_extract_all()] |
A character vector
[stringr::str_extract()] and [stringr::str_extract_all()]
Note that this is unlikely to print correctly on your R console, but it will work in (e.g.) the RStudio viewer.
ji_find(keyword)
ji_find(keyword)
keyword |
Emoji keyword |
emo::ji_find("happy")
emo::ji_find("happy")
Convert text to emoji (by letter)
ji_fisher(x)
ji_fisher(x)
x |
Character string. Text you'd like to be emojified. |
Character string of emoji.
ji_fisher("Carrie Fisher is a delight")
ji_fisher("Carrie Fisher is a delight")
emoji glue
ji_glue(..., .envir = parent.frame())
ji_glue(..., .envir = parent.frame())
... |
strings to format, where ':x:' is replaced by an emoji for "x", using [ji()] and ':y*:' is replaced by all emojis that match "y", using [ji_find()]. |
.envir |
see [glue::glue()] |
[glue::glue()] for how the strings are concatenated
## Not run: ji_glue("one :heart:") ji_glue("many :heart*:") ## End(Not run)
## Not run: ji_glue("one :heart:") ji_glue("many :heart*:") ## End(Not run)
emoji keywords
ji_keyword
ji_keyword
An object of class list
of length 5586.
Vectorised over 'string'
ji_locate(string) ji_locate_all(string)
ji_locate(string) ji_locate_all(string)
string |
Input vector |
For 'ji_locate' an integer matrix, for 'ji_locate_all' a list of integer matrices
Vectorized over 'string'
ji_match(string) ji_match_all(string)
ji_match(string) ji_match_all(string)
string |
Input vector |
see [stringr::str_match()]
[stringr::str_match]
emoji names
ji_name
ji_name
An object of class character
of length 4239.
Summarise your p-values with emoji
ji_p(x)
ji_p(x)
x |
A vector of p-values. |
emo::ji_p(1) emo::ji_p(0.1) emo::ji_p(0.05) emo::ji_p(0.01) emo::ji_p(1e-6) emo::ji_p(rbeta(50, 2, 5))
emo::ji_p(1) emo::ji_p(0.1) emo::ji_p(0.05) emo::ji_p(0.01) emo::ji_p(1e-6) emo::ji_p(rbeta(50, 2, 5))
Vectorised over 'string' and 'replacement'
ji_replace(string, replacement) ji_replace_all(string, replacement)
ji_replace(string, replacement) ji_replace_all(string, replacement)
string |
Input vector |
replacement |
A character vector of replacements. Should either be of length 1 or the same length as 'string'. See [stringr::str_replace()] for details |
A character vector
A regular expression to catch all emojis
ji_rx
ji_rx
character vector
Keep strings containing an emoji, or find positions
ji_subset(string) ji_which(string)
ji_subset(string) ji_which(string)
string |
input vector |
A character vector
[stringr::str_subset()]
full list of emojis
jis
jis
tibble with columns - id: identifier - emoji: character representation of the emoji - name: name - group: group, e.g. "Smileys & People" - subgroup: sub group, e.g. "face-positive" - keywords: vector of keywords - runes: vector of unicode runes, i.e. hexadecimal representations prefixed with "U+" - nrunes: number of runes the emoji uses - apple ... windows: logical indicating if the given vendor supports the emoji
[Unicode® Emoji Charts v5.0](http://unicode.org/emoji/charts/index.html)
Keycap emoji sequence
keycap(x)
keycap(x)
x |
character to emoji keycap |
a keycap version of 'x'
## Not run: keycap(3) keycap(10) keycap('#') ## End(Not run)
## Not run: keycap(3) keycap(10) keycap('#') ## End(Not run)
medals
medal(position)
medal(position)
position |
1, 2, 3, or 'first', 'second', 'third', or 'gold', 'silver', 'bronze' |
## Not run: medal(gold) medal(third) medal(2) ## End(Not run)
## Not run: medal(gold) medal(third) medal(2) ## End(Not run)
moon phase
moon(date, day = day_in_synodic_cycle(date))
moon(date, day = day_in_synodic_cycle(date))
date |
a date |
day |
number of days since new moon If not supplied, 'day' is calculated using the approximation of [day_in_synodic_cycle], i.e the number of days since a known new moon modulo '29.530588853' days |
a moon emoji
## Not run: moon( today() ) ## End(Not run)
## Not run: moon( today() ) ## End(Not run)
geometric emoji
square(size = c("small", "medium", "medium-small", "large"), color = c("white", "black")) diamond(size = c("large", "small"), color = c("orange", "blue"))
square(size = c("small", "medium", "medium-small", "large"), color = c("white", "black")) diamond(size = c("large", "small"), color = c("orange", "blue"))
size |
size |
color |
color |
For 'square': - 'size' should be one of 'c( "small", "medium", "medium-small", "large" )' - 'color' should be "white" or "black"
For 'diamond' - 'size' should be "large" or "small" - 'color' should be "orange" or "blue"
## Not run: square( "small", "black" ) square( "large", "white" ) diamond( "small", "orange") ## End(Not run)
## Not run: square( "small", "black" ) square( "large", "white" ) diamond( "small", "orange") ## End(Not run)