Andy.Jian Andy.Jian -4 years ago 160
R Question

Any way of attaching .csl, .bib files by using `knitcitations` package?

I have tried to attach

bibliography.bib, nature.csl
files by using
packages on
, but when I execute the .Rmd file, I got following error:

pandoc-citeproc.exe: Could not find bibliography.bib
pandoc.exe: Error running filter pandoc-citeproc
Filter returned error status 1
Error: pandoc document conversion failed with error

I looked into
manual and how to attach
.csl, .bib
file by handy, but I got warning and can't attach these files on

Edit :

This is context of

title = "MuSERA: Multiple Sample Enriched Region Assessment",
author = {Vahid Jalili, Matteo Matteucci, Marco Masseroli, Marco J. Morelli},
journal = "Briefings in Bioinformatics",
year = "2016",
pages = "1-15",
url = {},
doi = "10.1093/bib/bbw029 ",

How can I attach
on package's vignette easily ? I read some post in SO and I confused about the given solution. I am quite new with using
packages, and I may get wrong with attaching
.bib, .csl files
in right way. Can any one help me out how to address this issues in Rstudio ? Any idea ? Thanks a lot :)


I've read this post and followed the solution :


but bibliography.bib is not printed in .Rmd file. I changed the global option for weaving Rnw file to knitr. How can I print out bibliography on .Rmd file ? Any further help please ?

Answer Source

As with Dirk, it just works for me. Maybe you didn't put the YAML together properly, or maybe you never cited anything. Here's a sample document that works with your bib file:

title: "Biblio Example"
output: html_document
bibliography: bibliography.bib

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

## Here's Some Text

This text cites the paper:  [@Vahid_Jalili_Musera_2015].

## References

The bibliography will appear by magic at the end of the document, just
below this text.

See for more details.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download