#' Appel des applications dédiées
#'
#' @usage runRPTS(name)
#'
#' @param name string character indicating the name of the app to use.
#' @author Remy Moine <remymoine95@gmail.com>
#'
#'
#' @export
runRPTS <- function(name) {
# locate all the shiny app examples that exist
validExamples <- list.files(system.file("shiny-apps", package = "RPTS"))
validExamplesMsg <-
paste0(
"Valid apps names are: '",
paste(validExamples, collapse = "', '"),
"'")
# if an invalid example is given, throw an error
if (missing(name) || !nzchar(name) ||
!name %in% validExamples) {
stop(
'Please run `runExample()` with a valid app name as an argument.\n',
validExamplesMsg,
call. = FALSE)
}
# find and launch the app
appDir <- system.file("shiny-apps", name, package = "RPTS")
shiny::runApp(appDir, display.mode = "normal")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.