[Rd] R package BibTex entries: looking for a more general solution

Michael Friendly friendly at yorku.ca
Mon Dec 19 14:56:34 CET 2011

On 12/19/2011 2:02 AM, Renaud Gaujoux wrote:
> Hi,
> I actually adapted and integrated this feature into Achim's -- nice -- 
> function (posted on r-help).
> Romain included it a couple of weeks ago into the bibtex package as 
> function write.bib, and submitted the update to CRAN, but some NOTEs 
> in the check delayed its availability on CRAN.
> You can still install and try out the new version with:
> install.packages("bibtex", repos="http://R-Forge.R-project.org")
> Keys for multiple citations are generated as "<pkgname>%i", which 
> might not be ideal, but works ok though. It might be better not number 
> the first (main) citation. Romain, I think I will submit a patch for 
> this.
> Hope this helps.
Thanks, Renaud

I now have a working function, Rpackages.bib() that is roughly 
equivalent to your write.bib() and other related
material at

Also, see the document
which reports some problems & perl fixes for the generated bibentries.  
These might be incorporated into
the functions to make the resulting bibtex files directly usable.  Your 
bibtex package seems the most natural place for

Also, write.bib() doesn't seem to work unless you pass a list of package 

 > write.bib()
Error in is(entry, "bibentry") :
   argument "entry" is missing, with no default
 > write.bib(NULL)
Error in write.bib(NULL) :
   Invalid argument `entry`: expected a bibentry object or a character 
vector of package names.


Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA

More information about the R-devel mailing list