18.4 usethis::use_readme_rmd()
- This function:
- Creates a template
README.Rmdfile
- File has a yaml header which outputs into a
github_document
- Adds the
.Rmdfile to.Rbuildignore(as we just want ourREADME.mdincluded)
- Creates a template
- If we need to make changes to the
READMEfile, we will edit the.Rmdfile and render it (usedevtools::build_readme()) to generate the updated.mdfile
- If your package is also a git repo, then there is a neat pre-commit hook that compares the
.Rmdfile to the.mdfile- if the
.Rmdfile is more recent than the.mdfile, it will show a warning:
> README.md is out of date; please re-knit README.Rmd - if the