rave-snippet | R Documentation |
Run snippet code
update_local_snippet(force = TRUE)
load_snippet(topic, local = TRUE)
force |
whether to force updating the snippets; default is true |
topic |
snippet topic |
local |
whether to use local snippets first before requesting online repository |
'load_snippet' returns snippet as a function, others return nothing
if(!is_on_cran()) {
update_local_snippet()
snippet <- load_snippet("dummy-snippet")
# Read snippet documentation
print(snippet)
# Run snippet as a function
snippet("this is an input")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.