I am trying to load a file from inside a code chunk in a papaja document
This is my header
---
title : "The title"
shorttitle : "Title"
author:
- name : "First Author"
affiliation : "1"
corresponding : yes # Define only one corresponding author
address : "Postal address"
email : "my@email.com"
role: # Contributorship roles (e.g., CRediT, https://casrai.org/credit/)
- Conceptualization
- Writing - Original Draft Preparation
- Writing - Review & Editing
- name : "Ernst-August Doelle"
affiliation : "1,2"
role:
- Writing - Review & Editing
affiliation:
- id : "1"
institution : "Wilhelm-Wundt-University"
- id : "2"
institution :
authornote:
abstract:
keywords : "keywords"
wordcount : "X"
bibliography :
floatsintext : no
figurelist : no
tablelist : no
footnotelist : no
linenumbers : no
mask : no
draft : no
header-includes :
documentclass : "apa6"
classoption : "man"
output :
papaja::apa6_pdf:
latex_engine: xelatex
---
And my code chunk
``` {r load file}
load("C:/Users/Raphael/Documents/git/masterarbeit/analysis/coding/debugging/issues/missing_viz.Rda")
```
If I load the file from the console, everything works fine. However, when I try to knit the document, I get the following error:
File not found in resource path
Error: pandoc document conversion failed with error 99
Execution halted
I am getting the same error message if I do
``` {r load file}
load("missing_viz.Rda")
```
(I thought that I might have a problem with having the Rmd and file not in the same folder, as in https://community.rstudio.com/t/pandoc-document-conversion-failed-with-error-99/18035 - but they are!).
Does anyone have an explanation? Imo even if not having the .Rda in .Rmd in the same folder, the command should work if I specify the full path.