Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Dirk Eddelbuettel


On 20 August 2024 at 15:47, Kurt Hornik wrote:
| > Kurt Hornik writes:
| 
| The variant attaches drops the URL and does unique.

Nice. Alas, some of us default to r-release as the daily driver and then

  Error in unname(tools:::.ORCID_iD_canonicalize(o)) : 
object '.ORCID_iD_canonicalize' not found
  > 

Will play with my 'RD' which I keep approximately 'weekly-current'. Quick
rebuild first.

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Kurt Hornik
> Dirk Eddelbuettel writes:

Meanwhile, I am close to committing a change to R-devel which adds
tools::CRAN_authors_db() with docs

  \code{CRAN_authors_db()} returns information on the authors of the
  current CRAN packages extracted from the \samp{Authors@R} fields in
  the package \file{DESCRIPTION} files, as a data frame with character
  columns giving the given and family names, email addresses,
  \abbr{ORCID} identifier, roles, and comments of the person entries,
  and the corresponding package.

Once make check-all is done ...

Best
-k

PS.  Sorry about tools:::.ORCID_iD_canonicalize(), had run into the same
issue when building the authors db on the CRAN master (which uses
current R release ...)

> On 20 August 2024 at 15:47, Kurt Hornik wrote:
> | > Kurt Hornik writes:
> | 
> | The variant attaches drops the URL and does unique.

> Nice. Alas, some of us default to r-release as the daily driver and then

>   Error in unname(tools:::.ORCID_iD_canonicalize(o)) : 
> object '.ORCID_iD_canonicalize' not found
>> 

> Will play with my 'RD' which I keep approximately 'weekly-current'. Quick
> rebuild first.

> Dirk

> -- 
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Dirk Eddelbuettel


On 21 August 2024 at 07:43, Dirk Eddelbuettel wrote:
| 
| On 20 August 2024 at 15:47, Kurt Hornik wrote:
| | > Kurt Hornik writes:
| | 
| | The variant attaches drops the URL and does unique.
| 
| Nice. Alas, some of us default to r-release as the daily driver and then
| 
|   Error in unname(tools:::.ORCID_iD_canonicalize(o)) : 
| object '.ORCID_iD_canonicalize' not found
|   > 
| 
| Will play with my 'RD' which I keep approximately 'weekly-current'. Quick
| rebuild first.

As simple as adding

  .ORCID_iD_canonicalize <- function (x) sub(tools:::.ORCID_iD_variants_regexp, 
"\\3", x)

and making the call (or maybe making it a lambda anyway ...)

  oid = unname(.ORCID_iD_canonicalize(o)))

After adding

  a <- sort_by(a, ~ a$family + a$given)

the first 48 out if a (currently) total of 6465 are empty for family.

  > sum(a$family == "")
  [1] 48
  > 

Rest is great!

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Kurt Hornik
> Kurt Hornik writes:

Committed now.

Best
-k

> Dirk Eddelbuettel writes:
> Meanwhile, I am close to committing a change to R-devel which adds
> tools::CRAN_authors_db() with docs

>   \code{CRAN_authors_db()} returns information on the authors of the
>   current CRAN packages extracted from the \samp{Authors@R} fields in
>   the package \file{DESCRIPTION} files, as a data frame with character
>   columns giving the given and family names, email addresses,
>   \abbr{ORCID} identifier, roles, and comments of the person entries,
>   and the corresponding package.

> Once make check-all is done ...

> Best
> -k

> PS.  Sorry about tools:::.ORCID_iD_canonicalize(), had run into the same
> issue when building the authors db on the CRAN master (which uses
> current R release ...)

>> On 20 August 2024 at 15:47, Kurt Hornik wrote:
>> | > Kurt Hornik writes:
>> | 
>> | The variant attaches drops the URL and does unique.

>> Nice. Alas, some of us default to r-release as the daily driver and then

>> Error in unname(tools:::.ORCID_iD_canonicalize(o)) : 
>> object '.ORCID_iD_canonicalize' not found
>>> 

>> Will play with my 'RD' which I keep approximately 'weekly-current'. Quick
>> rebuild first.

>> Dirk

>> -- 
>> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Dirk Eddelbuettel


On 21 August 2024 at 15:47, Kurt Hornik wrote:
| > Kurt Hornik writes:
| 
| Committed now.

That is just *lovely*:

   > aut <- tools::CRAN_authors_db()
   > dim(aut)
   [1] 47433 7
   > head(aut)
 given  family email   orcid role 
comment   package
   1Martin   Bladtmartinbl...@math.ku.dk aut, cre   
  AalenJohansen
   2 Christian  Furrer fur...@math.ku.dk  aut   
  AalenJohansen
   3Sercan Kahveci sercan.kahv...@plus.ac.at aut, cre   
   AATtools
   4Andrew   Pilnyandy.pi...@uky.edu -0001-6603-5490 aut, cre   
abasequence
   5   Sigbert  Klinke  sigb...@hu-berlin.de aut, cre   
 abbreviate
   6  Csillery Katalin   kati.csill...@gmail.com  aut   
abc
   > 

Can we possibly get this into r-patched and the next r-release?

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] ORCID ID finder via tools::CRAN_package_db() ?

2024-08-21 Thread Kurt Hornik
> Dirk Eddelbuettel writes:

Possibly yes, if there is enough "need" :-)

Best
-k

> On 21 August 2024 at 15:47, Kurt Hornik wrote:
> | > Kurt Hornik writes:
> | 
> | Committed now.

> That is just *lovely*:

>> aut <- tools::CRAN_authors_db()
>> dim(aut)
>[1] 47433 7
>> head(aut)
>  given  family email   orcid role 
> comment   package
>1Martin   Bladtmartinbl...@math.ku.dk aut, cre 
> AalenJohansen
>2 Christian  Furrer fur...@math.ku.dk  aut 
> AalenJohansen
>3Sercan Kahveci sercan.kahv...@plus.ac.at aut, cre 
>  AATtools
>4Andrew   Pilnyandy.pi...@uky.edu -0001-6603-5490 aut, cre 
>   abasequence
>5   Sigbert  Klinke  sigb...@hu-berlin.de aut, cre 
>abbreviate
>6  Csillery Katalin   kati.csill...@gmail.com  aut 
>   abc
>> 

> Can we possibly get this into r-patched and the next r-release?

> Dirk

> -- 
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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