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] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//Rtmpec47pf/file13f05e8fa4bf.Rmd"
js4shiny_rmd(type = "plain", path = tmpfile, overwrite = TRUE)
#> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//Rtmpec47pf/file13f05e8fa4bf.Rmd"