| init | R Documentation |
Downloads the latest project scaffold from the frogger-templates repository and restores any saved user configuration. This is the recommended way to start a new froggeR project.
init(path = here::here())
path |
Character. Directory where the project will be created. If the
directory does not exist, it will be created. Default is current project
root via |
The function performs these steps:
Creates the target directory if it does not exist
Downloads the latest template zip from GitHub
Copies only files that do not already exist (never overwrites)
Restores saved user config (_variables.yml, _brand.yml,
logos/) from ~/.config/froggeR/ if present
Creates a data/ directory (gitignored by default)
Existing files are never overwritten. Each created and skipped file is reported individually so you can see exactly what changed.
Global configuration is saved via save_variables and
save_brand. If no saved config exists, the template defaults
are used as-is.
Invisibly returns the normalized path.
write_variables, write_brand,
save_variables, save_brand
## Not run:
# Create a new project (directory is created automatically)
init(path = file.path(tempdir(), "my-project"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.