From georgi.boshnakov at manchester.ac.uk  Wed Mar 14 19:04:46 2018
From: georgi.boshnakov at manchester.ac.uk (Georgi Boshnakov)
Date: Wed, 14 Mar 2018 18:04:46 +0000
Subject: [Rd] punctuation in utils::cite()
Message-ID: <438D2EC9EAFE5946B2D5864670EA468E018F65313A@MBXP01.ds.man.ac.uk>

Hi,

I wonder if the following is a design decision in the default bib style  for utils::cite().

Create a bibentry object:

> bibs <- bibtex::read.bib(package = "tools")
> bibs

Murdoch D (2009). "Parsing Rd files." <URL:
http://developer.r-project.org/parseRd.pdf>.

When an entry is cited with with a text to include with argument `after', I would expect a comma after the year, but both textual and parenthesised citation include only a space delimiter:

> cite("murdoch:2009", bib = bibs, after = "section 2", textual = TRUE)
[1] "Murdoch (2009 section 2)"

> cite("murdoch:2009", bib = bibs, after = "section 2")
[1] "(Murdoch 2009 section 2)"


Is this intended?  Including the comma in `after' doesn't help, since the space is before it:

> cite("murdoch:2009", bib = bibs, after = ", section 2", textual = TRUE)
[1] "Murdoch (2009 , section 2)"

> cite("murdoch:2009", bib = bibs, after = ", section 2")
[1] "(Murdoch 2009 , section 2)"


Georgi Boshnakov


	[[alternative HTML version deleted]]



[Rd] punctuation in utils::cite()
Georgi Boshnakov