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

2022-01-04 Thread Spencer Graves
	  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






__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] doi confusion and Data codoc mismatches

2022-01-01 Thread Duncan Murdoch

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




__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] doi confusion and Data codoc mismatches

2021-12-26 Thread Duncan Murdoch
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.


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


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] doi confusion and Data codoc mismatches-confusing check

2021-12-26 Thread Spencer Graves

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())).



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".



NOTE:  I tried changing \href{}{} to \doi{}{} in 
'AccountantsAuditorsPct.Rd' and got what I expected:  First, I failed to 
mention before that this complaint does NOT appear in R CMD check on my 
local computer;  see sessionInfo() below.  when I checked how that doi 
reference displayed in Ecdat-manual.pdf, I found that "doi: 
10.18128/D010.V8.0" was displayed, followed by the "text to display to 
click to link to the doi url".



Specifically, I got:


Steven Ruggles, Sarah Flood, Ronald Goeken, Josiah Grover, Erin Meyer, 
Jose Pacas, and Matthew Sobek (2018) doi: 10.18128/D010.V8.0IPUMS USA: 
Version 8.0 [dataset]. Minneapolis, MN: IPUMS.



	  With \href{}{}, "doi: 10.18128/D010.V8.0" does not appear, and I get 
that URL by clicking on "IPUMS USA: Version 8.0 [dataset]. Minneapolis, 
MN: IPUMS."  With this version, clicking on "IPUMS USA: Version 8.0 
[dataset]. Minneapolis, MN: IPUMS." does nothing, whild clicking on 
"doi: 10.18128/D010.V8.0" takes me to that URL.



	  This looks like a change to how *.Rd files are rendered that has 
appeared in the process on GitHub but not in my local computer.  ???



  Thanks,
  Spencer Graves


> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.2

Matrix products: default
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets
[6] methods   base

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] doi confusion and Data codoc mismatches

2021-12-26 Thread Duncan Murdoch

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

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] doi confusion and Data codoc mismatches

2021-12-25 Thread Spencer Graves

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())).



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".



  Thanks,
  Spencer Graves

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel