Question: I'd like to create a PDF report with `knitr` with `LaTeX`-code in `RStudio` with `biblatex` for citations. However, the in-text-citations are always undefined and no bibliography is printed. The same bibliography works perfectly with a pure `.tex`-document stored in the same folder and containing the same citations, same path to the `.bib`-file etc. However, as for all references (also with `hyperref`) I have to compile twice. I thought this might be the problem with `knitr` (that the compilation is run only once), but the `hyperref`-references to figures work well. Any idea what might go wrong with the bibliography when using `knitr` and how I can solve the problem?

MWE:

```
\documentclass{article}

\usepackage[style=authoryear-comp, maxnames=1, bibencoding=utf8, backend=biber]{biblatex}
\bibliography{ZoteroOutput.bib}

\begin{document}

According to the literature \parencite{gonzalez2003} we can assume...

\printbibliography

\end{document}

```

From the `log`-file:

```
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                mwe
(biblatex)                and rerun LaTeX afterwards.

```

Answer: 
I think that the problem is in your `backend`, because Rstudio uses `texi2dvi` to write pdf and then it does not know about `biber`. 

Try to change:

`\usepackage[backend=biber]{biblatex}`

with 

`\usepackage[backend=bibtex]{biblatex}`

in the preamble.

Normally this work.
The standard procedure for getting citations to work properly is that you have to:

1) Run LaTeX

2) Run BibTex

3) Run LaTeX

4) Run LaTeX

One option is to use the command texify, others use a makefile. I am not entirely sure about what `knitr` runs, but probably it does not run the sequence enough. Personally, I use Emacs with ESS, combined with AuCTeX; it really works well for me.

P.S. I don't think you need to specify that it's a `.bib` file.