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

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Mon Aug 19 15:39:04 CEST 2024


On 19 August 2024 at 15:15, Thierry Onkelinx wrote:
| Maybe checklist:::author2df() might be useful. It is an unexported function
| from my checklist package. It converts a person() object to a dataframe.
| https://github.com/inbo/checklist/blob/5649985b58693acb88337873ae14a7d5bc018d96
| /R/store_authors.R#L38
| 
| df <- tools::CRAN_package_db()
| lapply(
|   df$`Authors using R`[df$Package  %in% c("git2rdata", "qrcode")],
|   function(x) {
|     parse(text = x) |>
|       eval() |>
|       vapply(checklist:::author2df, vector(mode = "list", 1)) |>
|       do.call(what = rbind)
|   }
| )
| 
| 
| [[1]]
|     given       family                       email               orcid affiliation usage
| 1 Thierry     Onkelinx    thierry.onkelinx using inbo.be 0000-0001-8804-4216        <NA>     1
| 2  Floris Vanderhaeghe floris.vanderhaeghe using inbo.be 0000-0002-6378-6229        <NA>     1
| 3   Peter       Desmet        peter.desmet using inbo.be 0000-0002-8442-8025        <NA>     1
| 4     Els     Lommelen        els.lommelen using inbo.be 0000-0002-3481-5684        <NA>     1
| 
| [[2]]
|     given   family                 email               orcid affiliation usage
| 1 Thierry Onkelinx qrcode using muscardinus.be 0000-0001-8804-4216        <NA>     1
| 2  Victor      Teh   victorteh using gmail.com  

That's a very nice start, thank you. (Will also look more closely at
checklist.)  It needs an `na.omit()` or alike, and even with that `rbind`
barked a few entries in (i = 19 if you select the full vector right now).

But definitely something to play with and possibly build upon. Thanks!  (And
the IDs of Floris and you were two of the ones I 'manually' added to a
DESCRIPTION file ;-)

Best,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list