froggeR
streamlines your Quarto workflow by providing
two powerful functions: quarto_project()
for complete project initialization and write_quarto()
for individual document creation. This vignette demonstrates how to use
these functions effectively and how they work together.
The quickest way to start a new Quarto project:
This single command creates a complete project structure:
Your new project includes:
Component | Description |
---|---|
frogs/ |
Main project directory |
frogs.qmd |
Main Quarto document |
frogs.Rproj |
RStudio project file |
_variables.yml |
Reusable document settings |
custom.scss |
Style sheet template |
dated_progress_notes.md |
Project documentation |
README.md |
Project documentation |
.gitignore |
Enhanced security settings |
Each component serves a specific purpose:
Quarto Document (frogs.qmd
)
Project Settings
(_variables.yml
)
Style Sheet (custom.scss
)
Create a new Quarto document in an existing project:
froggeR::write_quarto(
filename = "frog_analysis",
custom_yaml = TRUE # Use settings from _variables.yml
)
This creates frog_analysis.qmd
with:
For documents without project settings and requiring manual changes to the document YAML:
write_quarto()
supports two main workflows:
custom_yaml = TRUE
)
custom_yaml = FALSE
)
The custom_yaml = TRUE
template leverages your project’s
_variables.yml
settings, automatically populating author
information, styling, and other metadata. This means you can focus
immediately on content creation rather than document setup. Conversely,
custom_yaml = FALSE
provides a minimal template when you
need a standalone document without project-specific configurations.
Best practices for project organization:
Initial Setup
Recommended project structure:
Directory/File | Purpose | Contents |
---|---|---|
data/ |
Raw data storage | Input files, datasets |
output/ |
Analysis results | Figures, tables, exports |
R/ |
Custom functions | R scripts, utilities |
docs/ |
Documentation | Additional guides, notes |
*.qmd ** |
Analysis documents | Main content and code |
** This is provided from froggeR::quarto_project()
.
All others need to be created.
Additional Documents
Project Structure
frogs/
├── frogs.qmd
├── data_prep.qmd
├── analysis.qmd
├── _variables.yml
├── custom.scss
├── dated_progress_notes.md
└── README.md
Tips for effective document organization:
_variables.yml
updatedCommon .gitignore
patterns:
Pattern | Excludes | Why |
---|---|---|
*.rds |
R data files | Data security |
.Rhistory |
R history files | Session cleanup |
output/ |
Generated files | Avoid tracking outputs |
*.html |
Rendered documents | Focus on source files |
Customize your project structure:
Then add specialized documents:
# Data preparation
froggeR::write_quarto(filename = "01_data_prep")
# Analysis
froggeR::write_quarto(filename = "02_analysis")
# Results
froggeR::write_quarto(filename = "03_results")
Note: When working in a
froggeR
project,write_quarto()
automatically uses your project’s_variables.yml
settings by default, ensuring consistent styling and metadata across all documents.
Modify individual documents while maintaining project consistency:
YAML Additions
Style Variations
custom.scss
file
(provided)Common issues and solutions:
_variables.yml
existsFor more information on:
vignette("customizing-quarto", package = "froggeR")
?write_scss
?settings
froggeR
’s project workflow provides:
Happy documenting! 🐸
Streamlined Quarto workflows with automated excellence