R/example.R

Defines functions m_shiny_demo

Documented in m_shiny_demo

#' Run examples of using \code{r3dmol} in a Shiny app
#'
#'
#' @examples
#' if (interactive()) {
#'   m_shiny_demo()
#' }
#' @export
m_shiny_demo <- function() {
  app_dir <- system.file("example", package = "r3dmol")
  if (app_dir == "") {
    stop("Could not find example directory. Try re-installing `r3dmol`.",
      call. = FALSE
    )
  }

  shiny::runApp(app_dir, display.mode = "normal")
}

Try the r3dmol package in your browser

Any scripts or data that you put into this service are public.

r3dmol documentation built on March 14, 2021, 5:08 p.m.