[R-pkg-devel] multiple bibentry()s in CITATION
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Mon Mar 27 16:38:12 CEST 2017
Thanks. It would be great to have this working in 3.4. In Bioc there are
multiple packages with CITATION files with multiple entries, one such
example is minfi
bioconductor.org/packages/minfi
On my wishlist is that it would be great to have support for printing the
header field which many people use to give a context for the citation. This
is important because when you list multiple papers you need (I think) some
explanation for when to cite the different ones.
Best,
Kasper
On Mon, Mar 27, 2017 at 7:25 AM, Martin Maechler <maechler at stat.math.ethz.ch
> wrote:
> >>>>> Fox, John <jfox at mcmaster.ca>
> >>>>> on Mon, 16 Jan 2017 15:44:05 +0000 writes:
>
> > Dear Martin,
> > Thanks for addressing this question, if belatedly!
>
> > After a little bit of thought, perhaps a default somewhere between 1
> and Inf makes sense, along with an additional argument to citation:
> citation(package="pkg", bibtex.max=n), with default bibtex.max=
> getOption("citation.bibtex.max"), where the citation.bibtex.max option is
> initially set to something like 4. If the number of available citations
> exceeds bibtex.max, then a message like "there are additional BiBTeX
> citations, enter 'citation(package="pkg", bibtex.max=Inf)' to see all of
> them."
>
> In the mean time, I have always used my proposed change.
> I think any number between 1 and Inf is so much arbitrary that
> inspite of your good thoughts I kept the *new* default at Inf.
>
> and because of this open question, I have forgotten to commit
> the change to the development version of R !
>
> I have done so now, however not ported it yet to "R 3.4.0 alpha".
> If not much surfaces (in CRAN / Bioc checks), we may port it in
> time for 3.4.0.
>
>
> Martin
>
> > Best,
> > John
>
> >> -----Original Message-----
> >> From: Martin Maechler [mailto:maechler at stat.math.ethz.ch]
> >> Sent: Monday, January 16, 2017 10:02 AM
> >> To: Fox, John <jfox at mcmaster.ca>
> >> Cc: r-package-devel at r-project.org
> >> Subject: Re: [R-pkg-devel] multiple bibentry()s in CITATION
> >>
> >> >>>>> Fox, John <jfox at mcmaster.ca>
> >> >>>>> on Fri, 2 Sep 2016 15:42:46 +0000 writes:
> >>
> >> (which is more than 4 months ago)
> >>
> >> > Dear list members,
> >> > I've noticed that citation(package="pkg") generates both a text
> >> citation and a BiBTeX entry when the CITATION file contains a single
> >> call to bibentry() or citEntry(), but that only text citations are
> shown
> >> if there are multiple calls to bibentry() or citEntry().
> >>
> >> > Is this behaviour intentional? In my opinion, it's useful always
> >> to show the BiBTeX (although it's available through
> >> toBibtex(citation(package="pkg")) ).
> >>
> >> > The Writing R Extensions manual says, "A CITATION file will
> >> contain *calls* [my emphasis] to function bibentry."
> >>
> >> > Thanks,
> >> > John
> >>
> >> and you did not get a reply....
> >> I had wanted but forgotten about it ... two parts :
> >>
> >> 1) On November 24, 2012, I had improved R with an option to get
> this
> >> so this has been a "hidden gem" ;-) for a while in R:
> >>
> >> > options(citation.bibtex.max = Inf)
> >> > citation(package = "Rcmdr")
> >>
> >> To cite the 'Rcmdr' package in publications use:
> >>
> >> Fox, J., and Bouchet-Valat, M. (2017). Rcmdr: R Commander. R package
> >> version 2.3-2.
> >>
> >> A BibTeX entry for LaTeX users is
> >>
> >> @Manual{,
> >> title = {{Rcmdr: R Commander}},
> >> author = {John Fox and Milan Bouchet-Valat},
> >> year = {2017},
> >> note = {R package version 2.3-2},
> >> url = {http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/},
> >> }
> >>
> >> Fox, J. (2017). Using the R Commander: A Point-and-Click Interface
> or
> >> R. Boca Raton FL:
> >> Chapman and Hall/CRC Press.
> >>
> >> A BibTeX entry for LaTeX users is
> >>
> >> @Book{,
> >> title = {Using the {R Commander}: A Point-and-Click Interface for
> >> {R}},
> >> author = {John Fox},
> >> year = {2017},
> >> publisher = {Chapman and Hall/CRC Press},
> >> address = {Boca Raton {FL}},
> >> url = {http://socserv.mcmaster.ca/jfox/Books/RCommander/},
> >> }
> >>
> >> Fox, J. (2005). The R Commander: A Basic Statistics Graphical User
> >> Interface to R.
> >> Journal of Statistical Software, 14(9): 1--42.
> >>
> >> A BibTeX entry for LaTeX users is
> >>
> >> @Article{,
> >> title = {The {R} {C}ommander: A Basic Statistics Graphical User
> >> Interface to {R}},
> >> author = {John Fox},
> >> year = {2005},
> >> journal = {Journal of Statistical Software},
> >> volume = {14},
> >> number = {9},
> >> pages = {1--42},
> >> url = {http://www.jstatsoft.org/v14/i09},
> >> }
> >>
> >> >
> >> ----------------
> >>
> >> This all works "obviously" (;-) via utils:::format.bibentry () and
> even
> >> when I had made the number one an argument to that function with a
> >> default you can set via options(), I had wondered a bit why the
> cutoff
> >> should by default be at one.
> >>
> >> E.g., it looks strange that by *adding* a 2nd reference, you get
> shorter
> >> citation output.... and to me it would seem more coherent to have
> the
> >> default rather be 'Inf' instead of '1', i.e. always showing both
> text
> >> and bibtex.
> >>
> >> There is quite a difference though: For our copula package, e.g.,
> >>
> >> > options(citation.bibtex.max = 1); citation(package = "copula")
> >>
> >> To cite the R package copula in publications use:
> >>
> >> Marius Hofert, Ivan Kojadinovic, Martin Maechler and Jun Yan (2017).
> >> copula:
> >> Multivariate Dependence with Copulas. R package version 0.999-16 URL
> >> https://CRAN.R-project.org/package=copula
> >>
> >> Jun Yan (2007). Enjoy the Joy of Copulas: With a Package copula.
> >> Journal of Statistical
> >> Software, 21(4), 1-21. URLhttp://www.jstatsoft.org/v21/i04/.
> >>
> >> Ivan Kojadinovic, Jun Yan (2010). Modeling Multivariate
> Distributions
> >> with Continuous
> >> Margins Using the copula R Package. Journal of Statistical Software,
> >> 34(9), 1-20. URL
> >> http://www.jstatsoft.org/v34/i09/.
> >>
> >> Marius Hofert, Martin Maechler (2011). Nested Archimedean Copulas
> Meet
> >> R: The nacopula
> >> Package. Journal of Statistical Software, 39(9), 1-20. URL
> >> http://www.jstatsoft.org/v39/i09/.
> >>
> >> >
> >>
> >> This is relatively compact (18 lines)
> >> whereas it gives 67 lines of output when the option is set to
> something
> >> >= 4.
> >>
> >> Other opinions?
> >> What do you think, would it be worth the compatibility break to
> change
> >> the default from '1' to 'Inf' ?
> >>
> >> Best regards,
> >> Martin
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list