.runApp <- function(app, ...) {
## selectively use the RStudio viewer pane (if available)
viewer <- getOption("viewer")
if (!is.null(viewer) && is.function(viewer)) {
runApp(app, launch.browser = viewer, ...)
} else {
runApp(app, ...)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.