Skip to content

Commit

Permalink
use bibentry() instead of the old-style citEntry()
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed May 24, 2023
1 parent 8a90f7b commit 994d948
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
citHeader("To cite the 'knitr' package in publications use:")

year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
vers = paste('R package version', meta$Version)
if (length(year) == 0) year = format(Sys.Date(), '%Y')

citEntry(
entry = 'manual',
bibentry(
'manual',
title = paste('knitr:', meta$Title),
author = Filter(function(p) 'aut' %in% p$role, as.person(meta$Author)),
year = year,
note = vers,
url = meta$URL,
textVersion = paste('Yihui Xie (', year, '). knitr: ', meta$Title, '. ', vers, '.', sep = '')
url = meta$URL
)

citEntry(
entry = 'book',
bibentry(
'book',
title = 'Dynamic Documents with {R} and knitr',
author = 'Yihui Xie',
publisher = 'Chapman and Hall/CRC',
Expand All @@ -27,8 +25,8 @@ citEntry(
'2nd edition. Chapman and Hall/CRC. ISBN 978-1498716963')
)

citEntry(
entry = 'incollection',
bibentry(
'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}',
Expand Down

0 comments on commit 994d948

Please sign in to comment.