globals <- new.env(parent = emptyenv())
shiny_examples_dir_update <- function(examples_repo = "rstudio/shiny-examples") {
# set the globals shiny locatino for further use
globals$shiny_examples_loc <- download_repo(
examples_repo,
tempdir()
)
globals$shiny_examples_loc
}
shiny_examples_dir <- function(examples_repo) {
ret <- globals$shiny_examples_loc
if (!is.null(ret)) {
return(ret)
}
return(
shiny_examples_dir_update(examples_repo)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.