# Interactive example
if (interactive()) {
tmpdir <- file.path(tempdir(), "brand_files")
# Initialize config and local brand file
brand_init(install_path = tmpdir)
# Update local brand file if needed
get_brand_public(
config_file = file.path(tmpdir, "rbranding_config.yml")
)
# Cleanup
unlink(tmpdir, recursive = TRUE)
}
# Non-interactive example
tmpdir <- file.path(tempdir(), "brand_files")
brand_init(install_path = tmpdir)
get_brand_public(
config_file = file.path(tmpdir, "rbranding_config.yml"),
run_interactive = FALSE,
backup = TRUE,
backup_folder = tmpdir
)
# Cleanup
unlink(tmpdir, recursive = TRUE)
Run the code above in your browser using DataLab