[Rd] What about a bib file

Friedrich.Leisch@tuwien.ac.at Friedrich.Leisch at tuwien.ac.at
Sat Feb 4 16:57:13 CET 2006

>>>>> On Mon, 30 Jan 2006 17:49:37 -0500 (EST),
>>>>> Vincent Carey 525-2265 (VC5) wrote:

  > Romain Francois suggests that a central bibliographic database
  > (possibly in bibtex format) might be useful for reference inclusion
  > in R package man pages.  This has been discussed by a small
  > group, with one proposal presented for a package-specific bibtex database
  > placed in a dedicated package subdirectory.  Man page references would
  > then cite the sources enumerated in the database using their bibtex
  > tags.  This approach could encourage better annotation and should
  > confer greater accuracy on package:literature referencing.

  > This does not rule out a central archive that might include all the
  > references cited in base man pages.

  > We are doing some work on harvesting the bibliographic citations
  > in man pages in an R distribution, and converting them to a regular
  > format.  The \references section is free form, so the conversion
  > is not trivial, but progress has been made.

  > The infrastructure required to use this approach to propagate
  > (e.g., bibtex-formatted) bibliographic data into the man pages that
  > cite the sources is not yet available, but we hope to have some
  > prototypes in the next month.

Sounds great! The "hardest" parts are probably

1) a bibtex parser in R
2) at least one function converting arbitrary bibtex entries to text,
   i.e., the R equivalent of a .bst file.

(I'm only guessing what such a system would involve).

After looking into it when writing the citation() infrastructure I
decided I don't want to do it and went straight to S objects written
by the package author. All those string replacements and possible LaTeX
markup simply looked like too much effort for just 1-2 entries per
package ;-)

But it would be great to have the above functionality in R, of
course, and "all references" in a package are certainly a larger set
then what citation() should report, making the effort worthwhile.

My only wish is that the bibtex parser returns objects compatible to
class "citation" (either the same class or simple coercion). I
modelled the class after bibtex entries anyway, so that shouldn't be a
restriction (I hope). If we need to modify class "citation" to be
accomodate your needs, please let me know.

Once we can suck bibtex files into R it would be trivial to give users
a choice between writing

 CITATION files in the current form (with the benefit of headers and


 mark certain entries in the PACKAGE.bib file (whatever its name may be) 
 that they should be reported by citation().


PS: Of course I volunteer to alpha-test any prototypes you have,

More information about the R-devel mailing list