Bug 16305 - Seeking more consistent package descriptions and citations
Summary: Seeking more consistent package descriptions and citations
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R 3.1.2
Hardware: x86_64/x64/amd64 (64-bit) Windows 64-bit
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-04-08 20:32 UTC by Philippe Liège
Modified: 2015-04-09 07:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Liège 2015-04-08 20:32:52 UTC
Hello,

The following command provides a convenient way of citing R packages e.g. as footnotes into a LateX document using R and Sweave/knitr.

> paste(capture.output(print(citation('xtable'),style='latex')),collapse='')

Nicely formatted citations can be obtained using bibtex or biblatex. However, this increases unnecessarily the compiling time when a full bibliography is not needed.

The expected results looks like:

> paste(capture.output(print(citation('gdata'),style='latex')),collapse="")
[1] "Warnes GR, Bolker B, Gorjanc G, Grothendieck G, Korosec A, Lumley T, MacQueen D, Magnusson A, Rogers J and others (2014).\\emph{gdata: Various R programming tools for data manipulation}.R package version 2.13.3, \\url{http://CRAN.R-project.org/package=gdata}."

However, some packages cannot be formatted this way:

The expected results looks like:
> paste(capture.output(print(citation('Hmisc'),style='latex')),collapse="")
[1] "Jr FEH, Dupont wcfC and others. m (2015).\\emph{Hmisc: Harrell Miscellaneous}.R package version 3.15-0, \\url{http://CRAN.R-project.org/package=Hmisc}."

This occurs when standard text has been added in the "given" or "family" entries. 
> citation('Hmisc')$author
[1] "Frank E Harrell Jr <f.harrell@vanderbilt.edu>" "with contributions from Charles Dupont"        "many others."   

Other package are using formatting commands such as \bold or \bsl, etc. that requires loading additional packages (amsmaths, txtcmds, etc.) in the preamble of the LaTex document. Very similar text formatting can be obtained using standard Latex commands.

paste(capture.output(print(citation('texreg'),style='latex')),collapse="")
[1] "Leifeld P (2013).``texreg: Conversion of Statistical Model Output in R to \\bsl{}LaTeX and HTML Tables.''\\emph{Journal of Statistical Software}, \\bold{55}(8), pp. 1--24.\\url{http://www.jstatsoft.org/v55/i08/}."

Would it be possible to improve consistency in package descriptions and citations?


Regards,

Philippe