Add Citations to an RMarkdown Document and Print Bibliography

library(RefManageR)
bib <- ReadBib(system.file("Bib", "biblatexExamples.bib", package = "RefManageR"), 
    check = FALSE)
BibOptions(check.entries = FALSE, style = "markdown", bib.style = "numeric", 
    cite.style = "numeric")

This is an R Markdown document. This is an example of a citation in the text Herrmann, Öfele, Schneider, et al. [1]. Now we cite in parentheses [e.g., 2]. You can change the default options in a setup chunk at the start of the document or at any other point using the BibOptions function or by specifying options as a list in the .opts argument to the cite functions.

See what happens when [KpV; KU] use the shorthand field?

These are reports Chiu and Chow[3]; Padhye, Firoiu, and Towsley[4]. Their hyperlinks go to their entry in the bibliography. The link for [5] will take you to the document in a new window; this is the default behaviour, if a link is available (see ?open.BibEntry). The following citation has no hyperlink [6]. You can also embed plots, for example:

plot(cars)

plot of chunk unnamed-chunk-1

I've added a reference to CTAN without citing it. Look at all my Aristotle: [8; 9; 10; 11].

plot(cars)

plot of chunk unnamed-chunk-2

Some papers on the arXiv are Baez and Lauda [12]; Baez and Lauda [2]; Itzhaki [13]; Wassenberg and Sanders [14].

References

[1] W. A. Herrmann, K. Öfele, S. K. Schneider, et al. “A carbocyclic carbene as an efficient catalyst ligand for C-C coupling reactions”. In: Angew.~Chem. Int.~Ed. 45.23 (2006), pp. 3859-3862.

[2] J. C. Baez and A. D. Lauda. Higher-Dimensional Algebra V: 2-Groups. Oct. 27, 2004. arXiv: math/0307200v3.

[KpV] I. Kant. “Kritik der praktischen Vernunft”. In: I. Kant. Kants Werke. Akademie Textausgabe. Vol. 5: Kritik der praktischen Vernunft. Kritik der Urtheilskraft. Berlin: Walter de Gruyter, 1968, pp. 1-163.

[KU] I. Kant. “Kritik der Urtheilskraft”. In: I. Kant. Kants Werke. Akademie Textausgabe. Vol. 5: Kritik der praktischen Vernunft. Kritik der Urtheilskraft. Berlin: Walter de Gruyter, 1968, pp. 165-485.

[3] W. W. Chiu and W. M. Chow. A Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS) Operating System. Research rep. RC-6947. IBM, 1978.

[4] J. Padhye, V. Firoiu and D. Towsley. A Stochastic Model of TCP Reno Congestion Avoidance and Control. Tech. rep. 99-02. Amherst, Mass.: University of Massachusetts, 1999.

[5] N. Markey. Tame the BeaST. The B to X of BibTeX. Oct. 16, 2005. URL: http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf (visited on 10/01/2006).

[6] I. de Geer. “Earl, Saint, Bishop, Skald~- and Music. The Orkney Earldom of the Twelfth Century. A Musicological Study”. PhD thesis. Uppsala: Uppsala Universitet, 1985.

[7] CTAN. The Comprehensive TeX Archive Network. 2006. URL: http://www.ctan.org (visited on 10/01/2006).

[8] Aristotle. De Anima. Ed. by R. D. Hicks. Cambridge: Cambridge University Press, 1907.

[9] Aristotle. Physics. Trans. by P. H. Wicksteed and F. M. Cornford. New York: G. P. Putnam, 1929.

[10] Aristotle. Poetics. Ed. by D. W. Lucas. Clarendon Aristotle. Oxford: Clarendon Press, 1968.

[11] Aristotle. The Rhetoric of Aristotle with a commentary by the late Edward Meredith Cope. Ed. by E. M. Cope. With a comment. by E. M. Cope. Vol. 3. 3 vols. Cambridge University Press, 1877.

[12] J. C. Baez and A. D. Lauda. “Higher-Dimensional Algebra V: 2-Groups”. Version 3. In: Theory and Applications of Categories 12 (2004), pp. 423-491. arXiv: math/0307200v3.

[13] N. Itzhaki. Some remarks on 't Hooft's S-matrix for black holes. Mar. 11, 1996. arXiv: hep-th/9603067.

[14] J. Wassenberg and P. Sanders. Faster Radix Sort via Virtual Memory and Write-Combining. Aug. 17, 2010. arXiv: 1008.2849v1 [cs.DS].