#' Starts the shiny app
#'
#' Call this function to start the shiny app.
#'
#'@keywords internal
runExams <- function() {
## Input handler for questions
shiny::registerInputHandler("shinyjsexamples.chooser", function(data, ...) {
if(is.null(data))
NULL
else
list(questions=as.character(data$questions), left=as.character(data$left), right=as.character(data$right))
}, force = TRUE)
appDir <- system.file("shiny-exams", "examsapp", package = "shinyExams")
if (appDir == "") {
stop("Could not find app directory. Try re-installing `shinyExams`.", call. = FALSE)
}
shiny::runApp(appDir = appDir, display.mode = "normal")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.