Citing articles in R package using roxygen2 and BibTeX?

て烟熏妆下的殇ゞ 提交于 2019-12-06 17:01:15

问题


I'm using roxygen2 as a tool for documenting my R package, and I found that there is a @references tag in roxygen2, but that seems to only accept free form text. I found some presentation about roxygen which has tags @bibliograph and @cite, but am I correct that there is no such thing in roxygen2?

Should I then somehow take the references out of the bibtex-file and write them manually with appropriate formatting directly after the @references tag or is there some more clever way of doing this? I have about seven different articles I need to cite, over multiple functions/rd-files.


回答1:


Seems that there is a brand new pull request contributing this feature: https://github.com/klutometis/roxygen/pull/90

So hopefully we'll soon have this functionality.




回答2:


Until the functionality mentioned by cbeleites is integrated with roxygen2 (and five years on it has not been), the Rdpack package provides the best way of using Bibtex in R.

For details, see Citing articles using roxygen2.



来源:https://stackoverflow.com/questions/10207564/citing-articles-in-r-package-using-roxygen2-and-bibtex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!