| choose_with_menu | R Documentation |
Choose data with menu.
choose_with_menu(df, filter_cols, extract = NULL)
df |
A dataframe |
filter_cols |
A string or string vector |
extract |
A string |
If extract is NULL, return a dataframe, else return a vector.
if(interactive()){
data(climate_world)
climate_world <-
climate_world %>%
dplyr::mutate_all(stringi::stri_unescape_unicode)
choose_with_menu(climate_world, filter_cols = "continent")
4 # input
choose_with_menu(climate_world, filter_cols = c("continent", "country", "station"))
4 # input
3 # input
2 # input
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.