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

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.

See also

Examples

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