papaja
papaja copied to clipboard
attempt to index a nil value (pandoc error 83)
Describe the bug
If I try to include a table from the package table1, I receive the error printed below. I first convert the table to a kable object using as.data.frame(tbl1) %>% kable()
. I can knit the document to word, pdf or html without any issues. Only when I knit using the index.Rmd file with papaja do I get the error. Other tables from a different format seem not cause the issue with papaja but only this specific table. Any ideas what could be causing this and how I can solve it?
Error running filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/papaja/lua/docx_fixes.lua:
...ns/4.3-arm64/Resources/library/papaja/lua/docx_fixes.lua:24: attempt to index a nil value (field 'integer index')
stack traceback:
Error: pandoc document conversion failed with error 83
Execution halted
Unfortunately, I cannot share this specific document for reproducibility.
Hi Henrik, can you share (a anonymized version of) the YAML front matter?
Hi Frederik,
see below
---
title : "A title"
shorttitle : "A title"
author:
- name : "Henrik Eckermann"
affiliation : "1"
corresponding : yes # Define only one corresponding author
address : "Donders Institute for Brain, Cognition and Behavior, Kapittelweg 29, 6525EN Nijmegen, The Netherlands"
email : "myemail"
role: # Contributorship roles (e.g., CRediT, https://casrai.org/credit/)
- "Original Draft Preparation"
- "Data Analysis"
- "Review & Editing"
- name : "name of colleague"
affiliation : "1"
role:
- "Conceptualization"
- "Data Collection"
- "Review & Editing"
- name : "Another colleague"
affiliation : "2"
role:
- "Supervision"
- "Review & Editing"
- name : "Another colleguage"
affiliation : "1"
role:
- "Conceptualization"
- "Review & Editing"
- "Supervision"
affiliation:
- id : "1"
institution : "Radboud university medical center, Donders Institute for Brain, Cognition and Behaviour, Department of Cognitive Neuroscience, Nijmegen, The Netherlands"
- id : "2"
institution : "Institute of my colleague"
abstract: |
my abstact
keywords : "Some keywords"
wordcount : "323"
csl : "bib/gut-microbes.csl"
bibliography : "bib/final.bib"
floatsintext : no
linenumbers : yes
draft : no
mask : no
figurelist : yes
tablelist : yes
footnotelist : no
classoption : "man"
output : papaja::apa6_docx
---
I am also receiving this error when I try to knit to Word in the usual way that works for me.
I've knitted the same paper before many times with no issue. I made a few small updates today after leaving it in a drawer for a few months, and now I experience the error.
I suspect it is to do with a package update.
Yup, just to confirm I rolled back papaja
to v 0.1.0 and I no longer experience the rendering error.
Hi @HenrikEckermann, this has taken too long, but if you are still interested, you can try the fix on #595. It has resolved the issue for me.