12 Contribute

You are welcome to add to this wiki. If you have a worked example, a missing topic, a language-specific tip or a correction, this is how to add it.

Copy the page template, write your page, add its filename to _bookdown.yml, run Rscript render.R, and open a pull request. For a small fix, use the Edit this page link in the footer of any chapter instead.

12.1 Make a page

  1. Copy the template.

    cp templates/page-template.Rmd 14-my-page.Rmd

    templates/page-template.Rmd is a working example of everything this wiki uses: the callouts, the R/Python tabs, the before/after blocks, a checklist and the house style. Write over it.

  2. Start with a level-1 heading and an ID, so other pages can link to it:

    # My page {#my-page}
  3. Register the file in _bookdown.yml, in the position where you want it to appear. Keep 13-references.Rmd last.

  4. Build and check.

    Rscript render.R

    Open docs/index.html. If you cited anything, add it to 13-references.Rmd, alphabetically by first author, and give it an entry in assets/tada-citations.js so the hover card works. Cite it in the text as [Author Year]{.tada-cite data-key="author-year"}.

  5. Open a pull request saying what you added and where it came from.

12.2 The one rule

Keep what the papers say apart from what you are adding. Cite anything from a source paper by author and year, and put your own practical advice in a Wiki Tip box (::: {.tada-wiki}), as this wiki does throughout. That way readers can check every claim.

12.3 Templates

Copy these for contributing or for your own projects.

Template Use
templates/page-template.Rmd Skeleton for a new wiki page
templates/README-template.md Project README covering every Documented field
templates/tada-checklist.md The full TADA checklist, to drop into a project
templates/code-review-checklist.md The four Rs, as a reviewer’s worksheet