cboettig/knitcitations

Issue with write.bitex example

Closed this issue · 4 comments

From your Wiki page (Windows, knitcitations from CRAN 1.05)

library("knitcitations")
cleanbib()
options("citation_format" = "pandoc")
write.bibtex(c("bibtex", "knitr", "knitcitations"), file = "example.bib")

#Error in write.bibtex(c("bibtex", "knitr", "knitcitations"), file = "example.bib") : 
#  entry object of class character not recognized

Apologies, write.bibtex only supports lists of citation objects, e.g.

 write.bibtex(c(citation("bibtex"),
                     citation("knitr"),
                     citation("knitcitations")),
                     file = "example.bib")

I do see that the documentation says you can give character vectors of package names, but that feature has been deprecated for simplicity and consistency of behavior. I've just updated the documentation.

p.s. From what wiki page? Can you provide a link?

http://www.carlboettiger.info/2012/05/30/knitcitations.html

The line below also does not work, there is no "ref" function, but I wanted to do it step by step.

I simply could not get a working version where my JabRef - generated file is used. Too many working doi examples....

@dmenne That blog post is nearly three years old I'm afraid. The newer versions of knitcitations have not been backwards compatible with that version since the release of 1.0.0, as knitcitations follows semantic versioning to indicate breaking backwards compatibility; please see: https://github.com/cboettig/knitcitations/blob/master/NEWS

I've done my best to keep the documentation in the package up to date but cannot guarentee blogs will be up to date as well.

Please see the README in this repo for a more recent introduction to the package.

No problem, I had not realized it was a blog post, it look so gitbucketish.