Edit file with RStudio snippets.

open_rstudio_snippets_file(type, rstudio_version = "auto")

Arguments

type

(character) A character vector of snippet types. Currently allowed values are "r", "markdown", "c_cpp", "css", "html", "java", "javascript", "python", "sql", "stan", "tex". May be unambiguously truncated. Defaults to "r".

rstudio_version

Numeric version of RStudio (the output is different for RStudio < 1.3 and 1.3 or newer series). If "current", the current version of RStudio will be determined automatically when it is running; otherwise, the 1.3-or-newer layout is used.

Examples

if (interactive()) {
  open_rstudio_snippets_file("r")

  open_rstudio_snippets_file("markdown")
}