Skip to contents

Opens or creates an R Markdown document using the js4shiny html document templates.

Usage

js4shiny_rmd(
  type = c("plain", "js"),
  full_template = FALSE,
  path = NULL,
  overwrite = FALSE
)

Arguments

type

One of "plain" for html_document_plain() or "js" for html_document_js().

full_template

Include the full R Markdown template document. Default is FALSE.

path

If NULL, an R Markdown document is opened in a new RStudio editor. If a path is given, a file is created and opened if in RStudio.

overwrite

If TRUE, will overwrite path if it exists.

Examples


tmpfile <- tempfile(fileext = ".Rmd")
js4shiny_rmd(type = "plain", full_template = TRUE, path = tmpfile)
#> [1] "/tmp/RtmpWth55F/file18736ee5679b.Rmd"
js4shiny_rmd(type = "plain", path = tmpfile, overwrite = TRUE)
#> [1] "/tmp/RtmpWth55F/file18736ee5679b.Rmd"