Re: [R] Citing R in journal articles (or the failure to)

From: Michael Friendly <>
Date: Wed, 12 Nov 2008 09:17:53 -0500

Achim Zeileis wrote:
  ... [ snip ] ...
> R> citation("tweedie")
> To cite package 'tweedie' in publications use:
> Peter K Dunn (2007). tweedie: Tweedie exponential family models. R
> package version 1.5.2.
> A BibTeX entry for LaTeX users is
> @Manual{,
> title = {tweedie: Tweedie exponential family models},
> author = {Peter K Dunn},
> year = {2007},
> note = {R package version 1.5.2},
> }
> ATTENTION: This citation information has been auto-generated from the
> package DESCRIPTION file and may need manual editing, see
> 'help("citation")' .
> One could complement that by a
> url = {}
> This could for example be done in a CITATION file (as suggested in my
> previous mail) which would also remove the "ATTENTION" message at the
> end of the citation() output.

In two recent in press articles where I cited R packages, I was asked by the copy-editor to add a location or url to the references. Could I suggest that citation() be modified to include the URL automatically?

In the function, this would entail replacing the line

   z$url <- meta$URL

with something like

   z$url <- if (is.null(meta$URL)
paste("", package, sep="") else meta$URL

I say "something like" because I'm not sure how to handle other repositories.

Along similar lines, someone recently posted a script to generate a .bib file for all packages installed. It would be useful if someone were to implement that script for CRAN and make the resulting R-packages.bib file available on the CRAN site.


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
Toronto, ONT  M3J 1P3 CANADA

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 12 Nov 2008 - 14:23:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Nov 2008 - 00:30:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive