Keniajin
Keniajin

Reputation: 1659

Why does my R Markdown file not output a citation from Bib

I am using R Markdown to create a document with citations. But the citation doesn't reflect on the pdf document generated. Using RStudio Version 0.98.994 and R 3.1

This is the .rmd file

---
title: "Untitled"
author: "keniajin"
date: "Tuesday, October 14, 2014"
output: pdf_document
---

This is an R Markdown document. 

```{r}
require(knitcitations)
summary(cars)
bib <- read.bibtex("ieetutorial.bib")
```

You can also embed citations, for example:
Smith says blah [-@author00] 

The BibTeX file is

@Book{author00,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}

Upvotes: 0

Views: 1085

Answers (1)

Sophia
Sophia

Reputation: 1951

Try to change the last line of your rmd-file to

Smith says blah `r citep(bib[["author00"]])`

Upvotes: 2

Related Questions