papaja turns R Markdown into an APA formatted manuscript
papaja (Preparing APA Journal Articles) is an R package that provides document formats to produce complete APA manuscripts from RMarkdown-files (PDF and Word documents) and helper functions that facilitate reporting statistics, tables, and plots.
At a glance
- What is it?
- papaja is an R package that adds an APA 6th edition manuscript template to R Markdown, plus functions that typeset statistical results, build tables and format figures. It suits behavioural researchers who want reproducible papers in a journal ready format without hand formatting every statistic.
- Who is it for?
- Adopt papaja if you write behavioural science papers in R and want APA formatting, tables and figures to be produced by code rather than by hand, and you are willing to work inside the APA 6th edition conventions it implements. Do not adopt it if your target journal has moved to the 7th edition or uses a different style, since the package is explicitly built around the 6th edition rules.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 52 days ago.
- What is it written in?
- Mainly HTML, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem is the last day before submission
papaja stands for Preparing APA Journal Articles, and the problem it solves is the one every behavioural researcher knows. Your analysis is in R, your manuscript is in R Markdown, and the last day before submission is spent moving numbers by hand into sentences, aligning table borders, reformatting confidence intervals and checking that a figure caption matches the style guide. papaja removes that day. It is described as an award winning R package that facilitates creating computationally reproducible, submission-ready manuscripts conforming to the American Psychological Association manuscript guidelines, 6th edition. The audience is specific: researchers in psychology and adjacent fields who publish in APA styled journals and who already work in R and R Markdown. The design assumption is reproducibility. A statistic that appears in your manuscript was produced by a function call in your document source, so re-running the analysis updates the text rather than leaving it stale. That is the substantive claim behind the package, and it is stronger than a set of formatting macros.
An R Markdown template, not a formatting add-in
The mechanism is a document template plus a set of helper functions, and understanding that split explains how the package fits into your workflow. The template can be used with or without RStudio, and it produces either PDF documents through the apa6 LaTeX class or Word documents through a .docx reference file. That dual output is the point. Many journals still want a Word file, and a package that only produced LaTeX output would force you to convert at the end, which is where format drift creeps back in. Once the template is in place, you select it when creating a new R Markdown file through the RStudio menus, and citations are added the standard pandoc way, by pointing a bibliography file at the YAML front matter with a bibliography key and citing from the text, using the citeproc extension. Two helper tools are recommended alongside it. citr is an RStudio addin for inserting Markdown citations swiftly, and RStudio's visual markdown editor also supports inserting citations. The package also links to a Stack Overflow tag for questions, and asks for a minimal complete verifiable example when you report a bug, which is the norm for R packages and a reasonable expectation.
apa_print turns a model object into reportable prose
The helper functions are where the time saving actually lands. apa_print() and apa_table() handle reporting of analysis results. When you pass an output object of a supported class, such as an htest or an lm object, to apa_print(), it returns a list of character strings that you can use to report the results. The pattern is worth showing because it is short:
``` r my_lm <- lm( Sepal.Width ~ Sepal.Length + Petal.Width + Petal.Length , data = iris ) apa_lm <- apa_print(my_lm)
apa_lm$full_result$Sepal_Length ```
The result of that last line is a string, with a dollar sign, a coefficient, a confidence interval, a t statistic with its degrees of freedom, and a p value, already formatted the way an APA manuscript wants it, including the convention of omitting the leading zero on p values. The value is not a number you compute and then reformat. It is a string you can drop into your prose, and it will regenerate if the data changes. The breadth of supported classes is the practical limit on the function, and the documentation is explicit about it, listing the classes covered from afex_aov and anova through emmGrid, glht, glm, htest, lme, lme4 style merMod objects, lsmobj, manova, mixed models, papaja_wsci, summary objects of many kinds, and the Bayes factor classes BFBayesFactor and BFBayesFactorTop. If your analysis returns one of those, it is typeset for you. If it returns something else, you are back to hand formatting.
Tables and figures are also code, not formatting
The second half of the toolset is presentation. apa_table() is used to produce publication ready tables inside an R Markdown document, and the example the documentation gives is reporting condition means with standard errors. The example builds the table with the pipe operator and dplyr, summarising the data first and then handing the result to papaja:
``` r npk |> # Summarize data dplyr::group_by(N, P) |> dplyr::summarise( mean = mean(yield) , se = sd(yield) / sqrt(length(yield)) , ```
The point of that pattern is that the data manipulation and the table formatting meet in one pipeline, so the table in the manuscript cannot drift from the analysis that produced it. The package also provides functions to create figures in accordance with APA guidelines, which in practice means the axis labels, the figure structure and the surrounding text follow the style guide rather than the defaults of whichever plotting library you happened to use. The overall argument of the package is that these three pieces, typeset results, tables and figures, together with the template, cover the mechanical surface of an APA manuscript. What the package does not attempt is the intellectual work of deciding what to report, and it does not attempt to know your journal's exceptions.
Installing it means installing a LaTeX distribution too
The installation story is the least obvious part. papaja is on CRAN, and it can also be installed from the GitHub repository, and the two routes are given explicitly:
``` r # Install latest CRAN release install.packages("papaja")
# Install remotes package if necessary if(!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")
# Install the stable development version from GitHub remotes::install_github("crsh/papaja")
Beyond the package itself, you need either a recent version of RStudio or pandoc. If you want PDF output in addition to Word output, you additionally need a TeX distribution, and the recommendation is TinyTex, which can be installed from within R:
r if(!requireNamespace("tinytex", quietly = TRUE)) install.packages("tinytex")
tinytex::install_tinytex() ```
MikTeX on Windows, MacTeX on Mac and TeX Live on Linux are named as alternatives. That dependency is a real cost on a shared machine or a CI runner, and it is worth budgeting for. The repository also keeps an update_csl.sh script at the top level, which is a reminder that the citation style file is maintained separately from the package code, and the manual is published as a website rather than only as package documentation, with a Stack Overflow tag for questions that the manual does not answer.
The sixth edition assumption is the binding constraint
Everything in this package is oriented to one rulebook, the American Psychological Association manuscript guidelines in the 6th edition, and that is where the sharpest limitation sits. If your target journal has moved to the 7th edition, or uses a house style with its own requirements, the template and the typesetting functions will produce something close to right rather than right, and close is not what a copy editor wants. The same applies to the table and figure conventions, which are APA conventions rather than generic scholarly ones. Beyond the style question, the package is explicitly for one workflow, R Markdown with R, and it does not help if your analysis is in Python or Stata and you only want the final document, though you can of course generate the numbers elsewhere and paste them in, which defeats the reproducibility argument. A second limit is the class list. The documented set of object classes apa_print() handles is finite, and it is not growing for every method in the R statistical ecosystem. The honest summary is that papaja makes the APA 6th edition submission path short for R users in the behavioural sciences, and does nothing for anyone else.
Editorial conclusion
Adopt papaja if you write behavioural science papers in R and want APA formatting, tables and figures to be produced by code rather than by hand, and you are willing to work inside the APA 6th edition conventions it implements. Do not adopt it if your target journal has moved to the 7th edition or uses a different style, since the package is explicitly built around the 6th edition rules. Before you start, confirm the LaTeX toolchain you need is installed, read the manual for the class list papaja supports, and check the licence file yourself, since GitHub reports a custom licence it cannot classify.
Frequently asked questions
How do I install papaja?
It is available on CRAN, so `install.packages("papaja")` works, or you can install the development version from GitHub with `remotes::install_github("crsh/papaja")` after installing the remotes package. For PDF output you additionally need a TeX distribution, and the recommended one is TinyTex, installable from within R with tinytex::install_tinytex().
What APA edition does papaja implement?
The 6th edition of the American Psychological Association manuscript guidelines. The template produces PDF output through the apa6 LaTeX class and Word output through a .docx reference file, and the typesetting and figure helpers follow the same edition's rules.
How do I report a statistical result in APA format with papaja?
Pass the output object of a supported class to apa_print(), for example an htest or an lm object, and it returns a list of character strings you can use in the text. The result is a formatted string with the coefficient, confidence interval, test statistic and p value already in manuscript form.
Does papaja work with Word documents?
Yes. The R Markdown template can produce Word documents using a .docx reference file, in addition to PDF output through the apa6 LaTeX class. Using the template does not require RStudio, since pandoc is an alternative, and you can select the APA template from the RStudio menus when creating a new R Markdown file.
Which licence does papaja use?
The repository declares a custom licence that GitHub cannot classify, with the terms kept in the LICENSE file at the root of the repository. If you need to know exactly what the grant permits, read that file rather than relying on the badge.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/crsh-papaja)Was this useful?