[R-pkg-devel] doi confusion and Data codoc mismatches--AND THE VALUE OF GITHUB

Spencer Graves @pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Tue Jan 4 19:28:09 CET 2022


	  Thanks to Duncan and Kurt for looking into this, recommending a patch 
for my code, and implementing a change to codocData.


VALUE OF GITHUB:  This exchange illustrates the value of GitHub:


	  1.  It made it easier for Duncan to diagnose the problem and 
recommend fixes both to me and to Kurt.


	  2.  I missed this email when it arrived five days after my post but 
found it after noticing a pull request from Duncan on GitHub.  I 
implemented it, and it worked!  Then I checked for a reply to my earlier 
post, and found Duncan's comment below.


	  Spencer


On 1/1/22 1:11 PM, Duncan Murdoch wrote:
> On 26/12/2021 8:03 a.m., Duncan Murdoch wrote:
>> I've now submitted a bug report for R:
>> https://bugs.r-project.org/show_bug.cgi?id=18266 along with a suggested
>> patch to remove the first of these.
> 
> And this patch was committed to the trunk by Kurt Hornik, so it should 
> appear in R 4.2.0 or maybe some 4.1.x release.  Thanks Kurt!
> 
> Duncan Murdoch
> 
>>
>> Duncan Murdoch
>>
>>
>> On 26/12/2021 5:55 a.m., Duncan Murdoch wrote:
>>> On 26/12/2021 12:07 a.m., Spencer Graves wrote:
>>>> Hello, All:
>>>>
>>>>
>>>>       The latest checks on
>>>> "https://github.com/sbgraves237/Ecdat/runs/4634725654?check_suite_focus=true" 
>>>>
>>>> identify two problems I don't know how to fix:
>>>>
>>>>
>>>> FIRST:  Data codoc mismatches from documentation object 'USnewspapers':
>>>>       Variables in data frame 'USnewspapers'
>>>>         Code: AdsProportion Ads_G2012dollars Ads_currentGdollars
>>>>               Circ_G2012dollars Circ_currentGdollars GDP_G2012 
>>>> GDP_nominalG
>>>>               Population_M RevenuePerCap_2012 RevenuePerCap_nominal
>>>>               Revenue_G2012dollars Revenue_currentGdollars Year
>>>>               newspapers_p_GDP
>>>>         Docs: Ads_G2012dollars Circ_G2012dollars Circ_currentGdollars
>>>>               Revenue_G2012dollars Revenue_currentGdollars 
>>>> AdsProportion
>>>>               Ads_currentGdollars GDP_G2012 GDP_nominalG Population_M
>>>>               RevenuePerCap_2012 RevenuePerCap_nominal Year 
>>>> newspapers_p_GDP
>>>>
>>>>
>>>>       I believe that the column names in the data.frame 'USnewspapers'
>>>> match the names in the order given in the *.Rd file and the variable
>>>> list following "Code" here matches that following "Docs" using, e.g.,
>>>> sort(scan(what=character())).
>>>
>>> You can debug this by running tools::codocData("Ecdat") after the
>>> package is installed.  It appears that some of the names in the docs are
>>> picking up newlines, specifically the ones documented like this:
>>>
>>> \item{Ads_currentGdollars,
>>>              Ads_G2012dollars,
>>>              Circ_currentGdollars,
>>>              Circ_G2012dollars,
>>>              Revenue_currentGdollars,
>>>              Revenue_G2012dollars}
>>>
>>> I think that's a bug in codocData.  A workaround is to put those all on
>>> one line.  You don't get a "line too long" warning, because they'll be
>>> reformatted in the display.
>>>
>>>>
>>>>
>>>> SECOND:  Found the following URLs which should use \doi (with the DOI
>>>> name only):
>>>>         File 'AccountantsAuditorsPct.Rd':
>>>>           https://doi.org/10.18128/D010.V8.0
>>>>         File 'OCC1950.Rd':
>>>>           https://doi.org/10.18128/D010.V10.0
>>>>
>>>>
>>>>       My concern here is that these two urls are in, e.g.,
>>>> \href{https://doi.org/10.18128/D010.V8.0}{text to display to click to
>>>> link to the doi url}.  If it were, e.g.,
>>>> \url{https://doi.org/10.18128/D010.V8.0} I would try replacing it with
>>>> \doi{10.18128/D010.V8.0}.  However, if I do that, I don't know what to
>>>> do with the "text to display to click to link to the doi url".
>>>
>>> The first of those links to a page with this version of the reference:
>>>
>>> Steven Ruggles, Sarah Flood, Ronald Goeken, Josiah Grover, Erin Meyer,
>>> Jose Pacas, and Matthew Sobek. Integrated Public Use Microdata Series:
>>> Version 8.0 [dataset]. Minneapolis: University of Minnesota, 2018.
>>> http://doi.org/10.18128/D010.V8.0
>>>
>>>
>>> You'd get a format pretty close to that if you don't try to make the
>>> title into a link, just enter it as
>>>
>>>      Steven Ruggles, Sarah Flood, Ronald Goeken,
>>>        Josiah Grover, Erin Meyer, Jose Pacas, and
>>>        Matthew Sobek (2018)
>>> IPUMS
>>>        USA: Version 8.0 [dataset]. Minneapolis, MN:
>>>        IPUMS. \doi{10.18128/D010.V8.0}
>>>
>>> Duncan Murdoch
>>
>



More information about the R-package-devel mailing list