Add Citations to an R HTML Document and Print Bibliography

library(RefManageR)
bib <- ReadBib(system.file("Bib", "biblatexExamples.bib",
                           package = "RefManageR"), check = FALSE)
bib2 <- ReadBib(system.file("Bib", "RJC.bib", package = "RefManageR"))[[seq_len(20)]]
BibOptions(check.entries = FALSE, style = "html")

This is an R HTML document. This is an example of a citation in the text Loh (1992). Now we cite in parentheses (Baez and Lauda, 2004b, Ch. 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. For demonstration purposes, we switch back and forth between citation styles here just to show the possibilities.

These are reports Chiu and Chow[1]; Padhye, Firoiu, and Towsley[2]. Their hyperlinks go to their entry in the bibliography. The link for Markey (2005) will take you to the document in a new window; this is the default, if a link is available (see ?open.BibEnty). The following citation has no hyperlink (de Geer, 1985).

I've added a reference to CTAN without citing it. Now I'm adding a reference from another bibliography (a second BibEntry object) (Serban, Staicu, and Carroll, 2013). Look at all my Aristotle: Aristotle[1]; Aristotle[2]; Aristotle[3]; Aristotle[4]. Below is the R logo.

R logo

Some papers on the arXiv are Baez and Lauda (2004a); Baez and Lauda (2004b); Itzhaki (1996); Wassenberg and Sanders (2010).

References

aristotle:anima Aristotle. De Anima. Ed. by R. D. Hicks. Cambridge: Cambridge University Press, 1907.

aristotle:physics Aristotle. Physics. Trans. by P. H. Wicksteed and F. M. Cornford. New York: G. P. Putnam, 1929.

aristotle:poetics Aristotle. Poetics. Ed. by D. W. Lucas. Clarendon Aristotle. Oxford: Clarendon Press, 1968.

aristotle:rhetoric 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.

baez/article 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.

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

chiu 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.

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

geer 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.

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

loh N. C. Loh. “High-Resolution Micromachined Interferometric Accelerometer”. MA Thesis. Cambridge, Mass.: Massachusetts Institute of Technology, 1992.

markey 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).

padhye 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.

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

More References

[1] N. Serban, A. M. Staicu and R. J. Carroll. “Multilevel Cross-Dependent Binary Longitudinal Data”. In: Biometrics 69.4 (2013), pp. 903–913.
https://cran.rstudio.com/web/packages/RefManageR/vignettes/TestHtml.html
cran.rstudio.com
crawl=CC-MAIN-2018-09
9931
application/http; msgtype=response
sha1:QEAIGBVIQPFRES7C2BCNDXDGGXB6DCI7
<urn:uuid:7afc2add-d5c0-404e-9bd2-0e4cb6c27f4f>
2018-02-20T09:37:00Z
54.230.16.116
text/html
sha1:OC3BCHRKDJG4R64RRE57JV5EN7BL54QL
<urn:uuid:5e6dba7c-89aa-41d6-8797-75ef2ab16e07>
https://cran.rstudio.com/web/packages/RefManageR/vignettes/TestHtml.html
response
<urn:uuid:833a053c-78e9-4072-b911-18a1562caeba>
robots: classic
hostname: ip-10-137-35-56.ec2.internal
software: Nutch 1.6 (CC)
isPartOf: CC-MAIN-2018-09
operator: Common Crawl Admin
description: Wide crawl of the web for February 2018
publisher: Common Crawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf