#' Interactively pick and return a row in a dataframe
#' @importFrom dplyr filter
#' @importFrom dplyr row_number
#' @export
pick_menu_item <-
function(dataframe) {
print(dataframe)
ans <- readline("Please select a row by number. ")
ans <- as.integer(ans)
response <- dataframe %>%
dplyr::filter(dplyr::row_number() == ans)
return(response)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.