CrumpLab / rstatsmethods

Course website for Psyc 7765G & 7766G (previously Psyc 7709G)
https://crumplab.github.io/rstatsmethods/
Creative Commons Attribution 4.0 International
4 stars 5 forks source link

Unable to knit to PDF for test trial #5

Closed dmall24 closed 3 years ago

dmall24 commented 4 years ago

receiving this error when attempting to knit PDF after installing papaja and going through all steps Error: For Lua filters, pandoc version 2.0 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available). Execution halted

CrumpLab commented 4 years ago

Just to recap, in class we tried a few things, including updating pandoc and verifying that it is on your system. Also, you had to revert to an older version of Rstudio because of a different problem (disconnecting from the current R session). Presently, one of the major errors appears to be with citeproc.

There is currently a recent issue opened suggesting someone else is having this problem: https://github.com/crsh/papaja/issues/427, but so far no replies.

CrumpLab commented 4 years ago

One thing to try and test is whether you can do citations in a regular R markdown document. If the problem is with pandoc-citeproc, then there is some issue with how citation keys are being handled.

  1. Create a new .rmd document, just the basic template
  2. add a new line in the yaml to point to a bibliography file in your R project, something like this:
---
title: "Untitled"
author: "Matt Crump"
bibliography: references.bib
date: "10/29/2020"
output: html_document
---
  1. Make a references.bib file. Just a plain text file in your R project folder, and give it a .bib ending. Next, add a citation to the .bib file you made, here is an example from my example semester long project:
@article{rosenbaum2017stand,
  title={Stand by your Stroop: Standing up enhances selective attention and cognitive control},
  author={Rosenbaum, David and Mama, Yaniv and Algom, Daniel},
  journal={Psychological science},
  volume={28},
  number={12},
  pages={1864--1867},
  year={2017},
  publisher={SAGE Publications Sage CA: Los Angeles, CA}
}

Make sure you add a couple new lines to the bottom of the references.bib file, after copying the above into it.

  1. the citation key for this reference is @rosenbaum2017stand. Put that into the main .Rmd file, and knit to pdf. If everything works, you should see the citation appear in the pdf along with a reference.

If this whole thing works for a regular R Markdown document, then problem might be more related to papaja.