make_dictionary()
creates a dictionary for use with add_dictionary()
.
Examples
my_sentiments <- make_dictionary(
list(
"😊" = c("happy", "joy", "smile"),
"😔" = c("unhappy", "sad", "frown")),
name = "emoji")
border_states <- make_dictionary(
definitions = list(
"Canada" = c(
"Alaska", "Washington", "Idaho",
"Montana", "North_Dakota", "Minnesota",
"Wisconsin", "Michigan", "Ohio",
"Pennsylvania", "New_York", "Vermont",
"New_Hampshire", "Maine", "AK", "WA",
"ID", "MT", "ND", "MN", "WI", "MI",
"OH", "PA", "NY", "VT", "NH", "ME"),
"Mexico" = c(
"California", "Arizona", "New_Mexico",
"Texas", "CA", "AZ", "NM", "TX")),
name = "borders")