#' dict creates a named vector as a python like dictionary
#' @param k vector of character
#' @param v vector of values
#' @return named vector
dict <- function(k, v) {
# create a named list from key/value pair
# k: a list of keys
# v: a list of values
d <- v
names(d) <- k
d
}
`%!%` <- function(x, y) {
dict(x, y)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.