snippets_install | R Documentation |
This function installs a set of R, HTML, JavaScript and CSS snippets that are helpful when developing Shiny apps and doing web development work in RStudio. By default, the snippets are installed where RStudio will find them. If you haven't previously installed snippets to RStudio, these snippets will mask some of the built-in snippets that ship with RStudio.
snippets_install(install_path = NULL, update = TRUE)
install_path |
Where should the snippets be installed? If |
update |
Should existing snippets be updated in place if there are any
conflicts? Default is yes ( |
If you already have snippets installed,
you can you can have the installed snippets update the existing snippets
in place with update = TRUE
. Or you can append the new snippets to the
existing snippets files with update = FALSE
. This option is desirable if
you want to make sure that no snippets are overwritten. The newer snippets
will mask older snippets, but no data will be lost.
snip_tmp <- tempfile("snippets")
dir.create(snip_tmp)
snippets_install(snip_tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.