# -----------------------------------
# ask user a yes/no question. Return TRUE/FALSE
#' @noRd
user_yes_no <- function(x = "continue? (Y/N): ") {
userChoice <- NA
while (!userChoice %in% c("Y", "y" ,"N", "n")) {
userChoice <- readline(x)
}
return(userChoice %in% c("Y", "y"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.