InCollection CITATION entry is not mapped to a schema.org @type.
cit <- citation("knitr")
toBibtex(cit[[3]])
#> @InCollection{,
#> booktitle = {Implementing Reproducible Computational Research},
#> editor = {Victoria Stodden and Friedrich Leisch and Roger D. Peng},
#> title = {knitr: A Comprehensive Tool for Reproducible Research in {R}},
#> author = {Yihui Xie},
#> publisher = {Chapman and Hall/CRC},
#> year = {2014},
#> note = {ISBN 978-1466561595},
#> url = {http://www.crcpress.com/product/isbn/9781466561595},
#> }
knitr_path <- find.package("knitr")
cm_cit <- codemeta:::guess_citation(knitr_path) # PR #4 needed
cm_cit[[3]][["@type"]]
#> NULL
This is probably just a matching error, “InCollection” vs. “Incollection”. Better to match on lowercase, I suppose?
I can open a PR with a fix.
Relatedly, could/should booktitle, editor (and isbn), i.e. info about
the book that contains the chapter, be included via
[isPartOf](https://schema.org/isPartOf)?
Session info
``` r
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.1.1 (2021-08-10)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language en
#> collate German_Germany.1252
#> ctype German_Germany.1252
#> tz Europe/Berlin
#> date 2021-09-12
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> backports 1.2.1 2020-12-09 [1] standard (@1.2.1)
#> cli 3.0.1 2021-07-17 [1] standard (@3.0.1)
#> codemeta 0.1.1 2021-09-12 [1] local
#> crayon 1.4.1 2021-02-08 [1] standard (@1.4.1)
#> desc 1.3.0 2021-03-05 [1] standard (@1.3.0)
#> digest 0.6.27 2020-10-24 [1] standard (@0.6.27)
#> ellipsis 0.3.2 2021-04-29 [1] standard (@0.3.2)
#> evaluate 0.14 2019-05-28 [1] standard (@0.14)
#> fansi 0.5.0 2021-05-25 [1] standard (@0.5.0)
#> fastmap 1.1.0 2021-01-25 [1] standard (@1.1.0)
#> fs 1.5.0 2020-07-31 [1] standard (@1.5.0)
#> glue 1.4.2 2020-08-27 [1] standard (@1.4.2)
#> highr 0.9 2021-04-16 [1] standard (@0.9)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.1)
#> jsonlite 1.7.2 2020-12-09 [1] standard (@1.7.2)
#> knitr 1.33 2021-04-24 [1] standard (@1.33)
#> lifecycle 1.0.0 2021-02-15 [1] standard (@1.0.0)
#> magrittr 2.0.1 2020-11-17 [1] standard (@2.0.1)
#> pillar 1.6.2 2021-07-29 [1] standard (@1.6.2)
#> pkgconfig 2.0.3 2019-09-22 [1] standard (@2.0.3)
#> purrr 0.3.4 2020-04-17 [1] standard (@0.3.4)
#> R6 2.5.1 2021-08-19 [1] standard (@2.5.1)
#> reprex 2.0.1 2021-08-05 [1] standard (@2.0.1)
#> rlang 0.4.11 2021-04-30 [1] standard (@0.4.11)
#> rmarkdown 2.10 2021-08-06 [1] standard (@2.10)
#> rprojroot 2.0.2 2020-11-15 [1] standard (@2.0.2)
#> rstudioapi 0.13 2020-11-12 [1] standard (@0.13)
#> sessioninfo 1.1.1 2018-11-05 [1] standard (@1.1.1)
#> stringi 1.7.4 2021-08-25 [1] CRAN (R 4.1.1)
#> stringr 1.4.0 2019-02-10 [1] standard (@1.4.0)
#> styler 1.5.1 2021-07-13 [1] standard (@1.5.1)
#> tibble 3.1.3 2021-07-23 [1] standard (@3.1.3)
#> utf8 1.2.2 2021-07-24 [1] standard (@1.2.2)
#> vctrs 0.3.8 2021-04-29 [1] standard (@0.3.8)
#> withr 2.4.2 2021-04-18 [1] standard (@2.4.2)
#> xfun 0.25 2021-08-06 [1] standard (@0.25)
#> yaml 2.2.1 2020-02-01 [1] standard (@2.2.1)
#>
#> [1] C:/Users/Daniel.AK-HAMBURG/Documents/R/win-library/4.1
#> [2] C:/Program Files/R/R-4.1.1/library
```
InCollection
CITATION entry is not mapped to a schema.org@type
.This is probably just a matching error, “InCollection” vs. “Incollection”. Better to match on lowercase, I suppose? I can open a PR with a fix.
Relatedly, could/should
booktitle
,editor
(andisbn
), i.e. info about the book that contains the chapter, be included via[isPartOf](https://schema.org/isPartOf)
?Session info
``` r sessioninfo::session_info() #> - Session info --------------------------------------------------------------- #> setting value #> version R version 4.1.1 (2021-08-10) #> os Windows 10 x64 #> system x86_64, mingw32 #> ui RTerm #> language en #> collate German_Germany.1252 #> ctype German_Germany.1252 #> tz Europe/Berlin #> date 2021-09-12 #> #> - Packages ------------------------------------------------------------------- #> package * version date lib source #> backports 1.2.1 2020-12-09 [1] standard (@1.2.1) #> cli 3.0.1 2021-07-17 [1] standard (@3.0.1) #> codemeta 0.1.1 2021-09-12 [1] local #> crayon 1.4.1 2021-02-08 [1] standard (@1.4.1) #> desc 1.3.0 2021-03-05 [1] standard (@1.3.0) #> digest 0.6.27 2020-10-24 [1] standard (@0.6.27) #> ellipsis 0.3.2 2021-04-29 [1] standard (@0.3.2) #> evaluate 0.14 2019-05-28 [1] standard (@0.14) #> fansi 0.5.0 2021-05-25 [1] standard (@0.5.0) #> fastmap 1.1.0 2021-01-25 [1] standard (@1.1.0) #> fs 1.5.0 2020-07-31 [1] standard (@1.5.0) #> glue 1.4.2 2020-08-27 [1] standard (@1.4.2) #> highr 0.9 2021-04-16 [1] standard (@0.9) #> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.1) #> jsonlite 1.7.2 2020-12-09 [1] standard (@1.7.2) #> knitr 1.33 2021-04-24 [1] standard (@1.33) #> lifecycle 1.0.0 2021-02-15 [1] standard (@1.0.0) #> magrittr 2.0.1 2020-11-17 [1] standard (@2.0.1) #> pillar 1.6.2 2021-07-29 [1] standard (@1.6.2) #> pkgconfig 2.0.3 2019-09-22 [1] standard (@2.0.3) #> purrr 0.3.4 2020-04-17 [1] standard (@0.3.4) #> R6 2.5.1 2021-08-19 [1] standard (@2.5.1) #> reprex 2.0.1 2021-08-05 [1] standard (@2.0.1) #> rlang 0.4.11 2021-04-30 [1] standard (@0.4.11) #> rmarkdown 2.10 2021-08-06 [1] standard (@2.10) #> rprojroot 2.0.2 2020-11-15 [1] standard (@2.0.2) #> rstudioapi 0.13 2020-11-12 [1] standard (@0.13) #> sessioninfo 1.1.1 2018-11-05 [1] standard (@1.1.1) #> stringi 1.7.4 2021-08-25 [1] CRAN (R 4.1.1) #> stringr 1.4.0 2019-02-10 [1] standard (@1.4.0) #> styler 1.5.1 2021-07-13 [1] standard (@1.5.1) #> tibble 3.1.3 2021-07-23 [1] standard (@3.1.3) #> utf8 1.2.2 2021-07-24 [1] standard (@1.2.2) #> vctrs 0.3.8 2021-04-29 [1] standard (@0.3.8) #> withr 2.4.2 2021-04-18 [1] standard (@2.4.2) #> xfun 0.25 2021-08-06 [1] standard (@0.25) #> yaml 2.2.1 2020-02-01 [1] standard (@2.2.1) #> #> [1] C:/Users/Daniel.AK-HAMBURG/Documents/R/win-library/4.1 #> [2] C:/Program Files/R/R-4.1.1/library ```