Learn R Programming

froggeR (version 1.0.0)

init: Initialize a froggeR Project from the Template

Description

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.

Usage

init(path = here::here())

Value

Invisibly returns the normalized path.

Arguments

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 here.

Details

The function performs these steps:

  1. Creates the target directory if it does not exist

  2. Downloads the latest template zip from GitHub

  3. Copies only files that do not already exist (never overwrites)

  4. Restores saved user config (_variables.yml, _brand.yml, logos/) from ~/.config/froggeR/ if present

  5. 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.

See Also

write_variables, write_brand, save_variables, save_brand

Examples

Run this code
if (FALSE) {
# Create a new project (directory is created automatically)
init(path = file.path(tempdir(), "my-project"))
}

Run the code above in your browser using DataLab