if (interactive()) {
library(surveydown)
# Use sd_redirect() to create redirect in R chunks of survey.qmd:
# sd_redirect(
# id = "redirect",
# url = "https://www.google.com",
# label = "Redirect to Google",
# button = TRUE,
# newtab = TRUE
# )
# sd_redirect() also supports reactive redirections.
# Find a working directory and start from a template:
sd_create_survey(template = "external_redirect")
# This creates survey.qmd and app.R - launch the survey using app.R
}
Run the code above in your browser using DataLab