deframe2 converts two-column data frames to a named vector, using the first column as the value and the second column as the name.
This is the opposite behavior of tibble::deframe().
Such named vectors are often useful for shiny::selectInput() and others.
1 | deframe2(x)
|
x |
An atomic vector (for |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.