powered by
Project hooks allow to define a function run just after {golem} project creation.
{golem}
project_hook(path, package_name, ...)
Used for side effects
Name of the folder to create the package in. This will also be used as the package name.
Package name to use. By default, golem uses basename(path). If path == '.' & package_name is not explicitly set, then basename(getwd()) will be used.
basename(path)
path == '.'
package_name
basename(getwd())
Arguments passed from create_golem(), unused in the default function.
create_golem()
if (interactive()) { my_proj <- function(...) { unlink("dev/", TRUE, TRUE) } create_golem("ici", project_template = my_proj) }
Run the code above in your browser using DataLab