if (FALSE) {
op <- gar_setup_menu(c("Check all settings",
"Configure authentication",
"Configure env arg 1",
"Configure env arg 2",
"Configure something else"
),
package_name = "googleAuthR")
choice <- gar_setup_check_session()
custom_env_check_f <- function(choice){
r <- readline("project-id:")
gar_setup_env_check("ARG2",
set_to = r,
edit_option = choice == 1, #allow editing of env arg
session_user = choice)
TRUE
}
gar_setup_menu_do(op, c(1,2), my_setup_auth_f, stop = TRUE)
gar_setup_menu_do(op, c(1,3), gar_setup_env_check,
env_arg = "ARG1", set_to = "BLAH",
edit_option = choice == 1, #allow editing of env arg
session_user = choice)
gar_setup_menu_do(op, c(1,4), custom_env_check_f)
gar_setup_menu_do(op, c(1,4), my_setup_something_f)
}
Run the code above in your browser using DataLab