quarto_project {froggeR} | R Documentation |
Create a Custom 'Quarto' Project
Description
This function creates a new 'Quarto' project directory with additional froggeR
features. It first calls quarto::quarto_create_project()
to set up the
basic structure, then enhances it with froggeR-specific files and settings.
Usage
quarto_project(name, path = here::here(), custom_yaml = TRUE)
Arguments
name |
Character string. The name of the 'Quarto' project directory and
initial |
path |
Character string. Path to the project directory. |
custom_yaml |
Logical. If TRUE (default), uses a custom YAML header in the initial
|
Details
This function creates a 'Quarto' project with the following enhancements:
-
_variables.yml
: Stores reusable YAML variables (ifcustom_yaml = TRUE
) -
.gitignore
: Enhanced settings for R projects -
README.md
: Template README file -
dated_progress_notes.md
: For project progress tracking -
custom.scss
: Custom 'Quarto' styling (ifcustom_yaml = TRUE
) -
.Rproj
: RStudio project file
If froggeR settings don't exist, it will prompt to create them.
Value
Invisibly returns the path to the created project directory.
See Also
Examples
if (quarto::quarto_version() >= "1.4") {
# Create a temporary directory for testing
tmp_dir <- tempdir()
# Create the Quarto project with custom YAML & associated files
quarto_project("frogs", path = tempdir(), custom_yaml = TRUE)
# Confirms files were created (optional, for user confirmation)
file.exists(file.path(tmp_dir, "frogs.rproj")) # Rproj file
file.exists(file.path(tmp_dir, "frog.qmd")) # Quarto doc
file.exists(file.path(tmp_dir, "_quarto.yml")) # project YAML file
# Create a new Quarto project with standard Quarto YAML
# quarto_project('frogs_standard', path = tempdir(), custom_yaml = FALSE)
# Clean up: Remove the created temp directory and all files
unlink(list.files(tempdir(), full.names = TRUE), recursive = TRUE)
}