Description Usage Arguments Details See Also Examples
Registers the template specified with the path argument.
1 | tmpl_register(path = NULL, global = FALSE)
|
path |
path to the directory where the template should be created (type: character, default: NA) |
global |
flag specifying if the template will be registered in the user's local template directory (taken from rsuite.user_templ_path) or in the global template directory (/etc/.rsuite/templates on Linux platforms) |
All templates have specific requirements: Project templates have to contain a PARAMETERS file. Package templates have to contain a DESCRIPTION file.
The user's local template directory is taken from the rsuite.user_templ_path option. The global template is specified as '/etc/.rsuite/templates' and only concerns Linux platforms
Other miscellaneous: rsuite_check_version
,
rsuite_getLogger
,
rsuite_get_ci_adapter_names
,
rsuite_get_os_info
,
rsuite_get_rc_adapter_names
,
rsuite_get_repo_adapter_names
,
rsuite_register_ci_adapter
,
rsuite_register_rc_adapter
,
rsuite_register_repo_adapter
,
rsuite_unregister_ci_adapter
,
rsuite_unregister_rc_adapter
,
rsuite_unregister_repo_adapter
,
rsuite_update
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # setup
old_option_value <- getOption("rsuite.user_templ_path")
tmpl_dir <- tempfile("user_templates_")
dir.create(tmpl_dir, recursive = TRUE, showWarnings = FALSE)
options(rsuite.user_templ_path = tmpl_dir)
user_templ <- tempfile("usr_templ_")
# initialize template from builtin
tmpl_start(basename(user_templ), path = tempdir())
# register it
tmpl_register(user_templ)
# clean up
options(rsuite.user_templ_path = old_option_value)
unlink(tmpl_dir, recursive = TRUE, force = TRUE)
unlink(user_templ, recursive = TRUE, force = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.