Document template

Exercise 1

Create a new papaja document from the R Markdown templates.

Exercise 2

Locate the example manuscript in the folder exercises/3_papaja_example_manuscript and open the file manuscript.pdf or manuscript.docx.

Populate the YAML front matter of your papaja document by transfering the metadata from the example manuscript.
The manuscript contains no note or contributorship information. The notefield and each author’s role field can simply be omitted.

Exercise 3

Make your manuscript preprint-ready: Hide line numbers and add a “DRAFT” watermark.
Use the draft and linenumbers options in the YAML front matter.
Try the single-column single-spaced document style by using the "doc" class option.

Citations

Exercise 4

Copy the introduction of the example manuscript into your document. Use the visual editor or the RStudio addin citr to insert citations.
Don’t forget to add the bibliography file(s) to your YAML front matter.

Report statistical analyses

Exercise 5

Locate and open the R-script analyses.R and data folder data accompanying the example manuscript in the folder exercises/3_papaja_example_manuscript.

Use apa_print() to report the results of one or more analysis using in-line code chunks in your papaja document.

Use the section comments (e.g., ## ----setup----) to split the R script into meaningful code chunks and use the section headings as chunk names.

You may omit parts of the R script that are not necessary for the analysis you are trying to insert into your document.
Add the corresponding plot that visualizes the results to your document.

Rendering tables

Exercise 6

Locate the section proportion-correct-table-appendix at the end of the R-script analyses.R.

Render the table of descriptive statistics for the generation task in your papaja document with apa_table().
Use the arguments col_spanners and midrules to structure the table. To add a caption, use the argument caption. See ?apa_table.

Place the table in the appendix of your document. To start an appendix, use the following special heading:

# (APPENDIX) Appendix {-}

Captions and cross-referencing

Exercise 7

Use a text-reference for your table caption and reference the table in the body of the text.
Text reference definitions must be on their own line, surrounded by empty lines, and start with (ref:reference-name).