Questions tagged [papaja]

The papaja tag should be used for questions concerning the usage of the papaja R package. The package provides an R Markdown template that can be used with (or without) RStudio to produce documents which conform to the American Psychological Association (APA) manuscript guidelines.

papaja is an R package in the making including a R Markdown template that can be used with (or without) RStudio to produce documents, which conform to the American Psychological Association (APA) manuscript guidelines (6th Edition). The package uses the LaTeX document class apa6 and a .docx-reference file, so you can create PDF documents, or Word documents if you have to. Moreover, papaja supplies R-functions that facilitate reporting results of your analyses in accordance with APA guidelines.

84 questions
2
votes
0 answers

CJK short title causes errors with Papaja RMarkdown

I'm writing an article with papaja package (an RMarkdown variant), which contains some Japanese characters. I would like to write its shorttitle in Japanese as follows: title : "ここは日本語もOK: You have a Japanese title" shorttitle :…
Carlos Luis Rivera
  • 3,108
  • 18
  • 45
2
votes
2 answers

How to use the papaja R package for glht output?

Following the instructions, I came up with the following: library(papaja) library(datasets) library(stats) library(multcomp) bla <- glm('MPG.highway ~ DriveTrain*Origin',data = Cars93) contrast.matrix <- rbind('main' = c(0,1,0,0,0.5,0), 'int' =…
fabiob
  • 273
  • 4
  • 14
2
votes
1 answer

formatting YAML headers in R

When using the R papaja package template, I figured how to justify (and further format the text in the sections following the YAML header by adding LaTEX packages to the YAML header. E.g: header-includes: - \usepackage[document]{ragged2e} However…
2
votes
2 answers

Is it possible to parse latex in YAML note field?

I am using the papaja for R and compiling to .pdf. I'd like to include a note field that has latex formatting in it, but it looks like the note field gets parsed so that it doesn't compile latex syntax. Is there a way around this? A short reprex is…
Pusto
  • 55
  • 4
2
votes
1 answer

knitting a figure to word using papaja fails

I am able to knit the following code to PDF. However, it always fails when trying to knit the output to Word (win 10, Rstudio 1.2.5033, R 3.6.2, papaja 0.1.0.9942). I had to delete the papaja header for posting (too much code). ```{r setup, include…
Jens
  • 35
  • 5
2
votes
3 answers

r table listing multiple categorical variables with frequencies

library("tidyverse") library("papaja") df <- structure(list(investment_type = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 3L), .Label = c("angel", "pre_seed", "seed"), class = "factor"), …
Kevin T
  • 141
  • 1
  • 12
2
votes
2 answers

tinytex can't write to directory when a latex package is missing

I'm running RStudio (R version 3.6.0) on a Ubuntu 18.04.2 LTS server and trying to compile a pdf using the {papaja} package. I removed the pre-bundled Tex distribution as recommended (sudo apt-get purge texlive-*) and installed…
Eric Green
  • 7,385
  • 11
  • 56
  • 102
2
votes
0 answers

papaja: modify spacing under headings

I am using the package papaja to write an APA-formatted manuscript with R markdown. I would like to modify the default spacing under headings (it's presently too large for my taste). As shown on the sample picture below (document rendered as pdf),…
msoftrain
  • 1,017
  • 8
  • 23
2
votes
1 answer

Formatting table from apa_list(list)

I am printing a table to PDF with much success. Standard hierarchical regression with three steps. However, my questions is twofold: 1) How do I add the asterisk to mark sig p values on the covariates and 2) how do I remove rows like AIC etc. At…
psych.tek
  • 25
  • 5
2
votes
0 answers

Error in as.data.frame.character(x, stringsAsFactors = FALSE, ...) when using papaja and tableone in RMarkdown

I am using papaja to create an APA formatted document in RMarkdown, however the apa_tables() function is throwing an error when I try to create my document [sidenote: apa_tables() builds on kable()] ## reprex dataframe head<-structure(list(age =…
Emily Kothe
  • 842
  • 1
  • 6
  • 17
2
votes
1 answer

Naming groups of (groups of) columns multiple times, adding headers with col_spanners on top of each other within APA table

I'm creating APA style tables using r markdown, latex and the package papaja with the function apa_table() for pdf documents. I would like to add an additional named col_spanner on top of the existing ones (two, with names 'Cars 1' and 'Cars 2', see…
Benjamin Telkamp
  • 1,451
  • 2
  • 17
  • 31
2
votes
1 answer

Markdown places my table in the end of document when rendering

I'm creating a pdf document with papaja and r markdown. when i render my document (apa6_pdf) it puts the table at the very end of the document. My chunk is in the middle of the document? I read that tables need to go even behind references and…
Benjamin Telkamp
  • 1,451
  • 2
  • 17
  • 31
1
vote
0 answers

Accessing language specific fixed names in papaja.terms

I am writing a APA-report in RStudio with rmarkdown and the papaja-package. Everything ist working fine except that I cannot change the names of "Figures", "Tables", "Keywords" etc in papaja.terms to the german denominations. I know that they are…
Skrobbler
  • 11
  • 1
1
vote
1 answer

How to remove the "Running head" from papaja in Rstudio

I'm writing an essay on APA template using papaja package in Rstudio. When I finished editing the short title and knit it for pdf to have a look. The "Running head" of "Running head: Short Title" still remain in the top like this. Is the "running…
CodeRabbit
  • 11
  • 3
1
vote
1 answer

Is it possible to move the abstract into a separate document for papaja?

The abstract is often the longest section in the YAML in a papaja Rmd, and I was wondering if it was possible to move this off into a separate document (e.g. another Rmd file) and include it via reference instead (just as other chapters can be).
Alvin Tan
  • 53
  • 3