Academic manuscripts need to combine careful reasoning, eloquent writing and detailed results in order to communicate new scientific results effectively. This poses a challenge in the workflow since common text editors like Word or Google Docs don’t handle code very well. Many academics are therefore forced to enter results manually, either by copy-pasting from their statistical software, or by cross-referencing an output file from the statistical software when they write up the results. This is not only time-consuming and boring, but can also result in errors.

An easy solution would be to just get rid of clunky text editors like Word all together, but since I don’t see that happening in my area of research any time soon I have found a workaround that lets you combine regular text with code and get a .docx file as an output.

Using the R package papaja to write manuscripts

Papaja is a R-package developed by Frederik Aust and Marius Barth. From the package repository:

papaja (Preparing APA Journal Articles) is an R package that provides document formats and helper functions to produce complete APA manscripts from RMarkdown-files (PDF and Word documents)

Papaja makes it possible to combine your text, references, and results in a single document so that you don’t have to pull the different parts together every time you update something. This makes your workflow a lot easier and minimises the risk of mistakes.

Other options

There are other options out there that are excellent choices if you prefer other formats than the APA-format that is used in papaja.