This function streamlines project documentation by a README.md file.
Usage
write_readme(path = here::here(), .initialize_proj = FALSE)
Arguments
- path
Character string. Path to the project directory.
- .initialize_proj
Logical. TRUE only if starting a
froggeR::quarto_project()
.
Details
The README.md template includes structured sections for:
Project description (study name, principal investigator, author)
Project setup steps for reproducibility
File and directory descriptions
Miscellaneous project notes
Examples
# Create a temporary directory for testing
tmp_dir <- tempdir()
# Write the README file
write_readme(path = tmp_dir)
#> ✔ Created README.md
#> ☐ Edit /tmp/RtmpQilr82/README.md.
# Confirm the file was created (optional, for user confirmation)
file.exists(file.path(tmp_dir, "README.md"))
#> [1] TRUE
# Clean up: Remove the created file
unlink(file.path(tmp_dir, "README.md"))