#' @importFrom rlang .data
get_template_form = function(){
forms = get_template_forms() %>%
dplyr::mutate(id = dplyr::row_number())
forms = forms %>% dplyr::filter(.data$title == "R") %>%
rbind(forms %>% dplyr::filter(.data$title != "R"))
forms %>%
dplyr::select(
.data$id, .data$title,
.data$last_updated
) %>%
print()
choice = NA
while(is.na(choice)){
choice = select_template_form()
}
forms[choice,]
}
make_choice = function(){
choice = readline("\nChoose a template by id, [default = 1]")
if(choice == ""){
choice = 1
}else{
choice = as.numeric(choice)
if(is.na(choice)){
print("bad choice, not numeric")
}
}
return(choice)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.