R/midocdemo.R

Defines functions midocVignette

Documented in midocVignette

#' Run an interactive vignette for the midoc package
#'
#' Runs an interactive version of the midoc vignette: Multiple Imputation DOCtor
#' (midoc). In the interactive version, you can apply midoc functions in
#' \link[shiny]{shiny-package} apps using your own DAG and data.
#'
#' @return A browser-based, interactive version of the midoc vignette
#' @export
#'
#' @examplesIf interactive()
#' # Run the interactive vignette
#' midocVignette()
midocVignette <- function() {
  appDir <- system.file("shinyexamples/midocdemoShiny.rmd", package = "midoc", mustWork=TRUE)
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `midoc`.", call. = FALSE)
  }

  rmarkdown::run(appDir)
}

Try the midoc package in your browser

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

midoc documentation built on Oct. 2, 2024, 5:06 p.m.