You can find the solutions for this exercise as well as the following
ones in the exercises
folder in the workshop material. You
can also navigate the workshop material online (including
exercises and solutions).
You can copy code from the exercise and solution files by clicking on the small blue clipboard icon in the upper right corner of the boxes showing the code.
Some of the exercise require you to add text and R code. Feel free to
copy from the example paper in the folder
exercises/example_manuscript
. We do, however, encourage you
to use material from a project of your own, if possible. It will be a
lot more fun.
In this exercise, you will create a first papaja document. The example data we use here is taken from the example manuscript provided with the workshop material. However, we encourage you to use your own data for this and the following exercises.
File > New File > R Markdown… > From Template
In the YAML front matter, thenote
field and each author’s
role
field can simply be omitted.
Make your manuscript “preprint-ready”:
"doc"
class option), anddraft
and linenumbers
options in the
YAML front matter.
Now let’s report some results.
apa_print()
.
If you are working with the example manuscript, locate and open the
R-script analyses.R
and data folder data
accompanying the example manuscript in the folder
exercises/3_papaja_example_manuscript
.
If you are unsure, whether your analysis is supported,
methods(apa_print)
provides a list of supported
classes.
apa_print()
you will need to manually
pick numerical results from your results object. str()
may
help to find the numbers you are looking for and apa_num()
,
apa_p()
, apa_df()
, and
apa_confint()
will facilitate formatting.
You can use apa_factorial_plot()
(or one of the
short-hands apa_barplot()
, apa_beeplot()
, and
apa_lineplot()
) or try our ggplot2-theme
theme_apa()
, if applicable.
Handles used to cross-reference figures and tables are generated automatically from the chunk label:
fig:chunk-label
ortab:chunk-label
.(ref:reference-name)
.
apa6_docx()
.
To start an appendix, use the following special heading:
# (APPENDIX) Appendix {-}
Manually (i.e. without using apa_print()
) report the
results for the following one-sided t-test according to the APA
guidelines.
t.test(extra ~ 1, data = sleep, alternative = "greater")
Report
str()
may help to find the numbers you are looking for and
apa_num()
, apa_p()
, apa_df()
, and
apa_confint()
will facilitate formatting.
After you have tried yourself, feel free to have a look at our solutions.