cboettig / knitcitations

:package: Generate citations for knitr markdown and html files
http://carlboettiger.info
Other
220 stars 28 forks source link

Missing date on DESCRIPTION #66

Closed lcolladotor closed 10 years ago

lcolladotor commented 10 years ago

Hi,

As you can see below, knitcitations is missing the date in its DESCRIPTION file.

> library('knitcitations')
> cleanbib()
> cite_options(hyperlink = 'to.doc', citation_format = 
+     'text', style = 'html')
> write.bibtex(citation('knitcitations'), file = 'test.bib')
Writing 1 Bibtex entries ... OK
Results written to file 'test.bib'
Warning message:
In citation("knitcitations") :
  no date field in DESCRIPTION file of package ‘knitcitations’
> library(devtools)
> session_info()
Session info--------------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.1 (2014-07-10)
 system   x86_64, darwin10.8.0        
 ui       AQUA                        
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            

Packages------------------------------------------------------------------------------
 package       * version    date       source                                 
 bibtex          0.3.6      2013-07-29 CRAN (R 3.1.0)                         
 devtools      * 1.5.0.9001 2014-09-16 Github (hadley/devtools@b9c619b)       
 digest          0.6.4      2013-12-03 CRAN (R 3.1.0)                         
 evaluate        0.5.5      2014-04-29 CRAN (R 3.1.0)                         
 httr            0.5        2014-09-02 CRAN (R 3.1.1)                         
 knitcitations * 1.0.2      2014-09-23 Github (cboettig/knitcitations@6503acb)
 lubridate       1.3.3      2013-12-31 CRAN (R 3.1.0)                         
 memoise         0.2.1      2014-04-22 CRAN (R 3.1.0)                         
 plyr            1.8.1      2014-02-26 CRAN (R 3.1.0)                         
 Rcpp            0.11.2     2014-06-08 CRAN (R 3.1.0)                         
 RCurl           1.95.4.3   2014-07-29 CRAN (R 3.1.1)                         
 RefManageR      0.8.34     2014-08-19 CRAN (R 3.1.1)                         
 RJSONIO         1.3.0      2014-07-28 CRAN (R 3.1.1)                         
 rstudioapi      0.1        2014-03-27 CRAN (R 3.1.0)                         
 stringr         0.6.2      2012-12-06 CRAN (R 3.1.0)                         
 whisker         0.3.2      2013-04-28 CRAN (R 3.1.0)                         
 XML             3.98.1.1   2013-06-20 CRAN (R 3.1.0)  

Cheers, Leo

cboettig commented 10 years ago

This is because CRAN likes to add the date automatically rather than rely on a manually specified date. You'll only see this if using the Github copy. Even though the base R function, 'citation' will throw the warning, ktcitations will automatically add the current date if no date is supplied in the Description of an R package, so that your citation renders appropriately. (e.g. try `citep(citation("knitcitations"))

On Tue, Sep 23, 2014 at 9:30 AM, Leonardo Collado-Torres < notifications@github.com> wrote:

Hi,

As you can see below, knitcitations is missing the date in its DESCRIPTION file.

library('knitcitations')> cleanbib()> cite_options(hyperlink = 'to.doc', citation_format = + 'text', style = 'html')> write.bibtex(citation('knitcitations'), file = 'test.bib') Writing 1 Bibtex entries ... OK Results written to file 'test.bib' Warning message: In citation("knitcitations") : no date field in DESCRIPTION file of package ‘knitcitations’> library(devtools)> session_info() Session info-------------------------------------------------------------------------- setting value version R version 3.1.1 (2014-07-10) system x86_64, darwin10.8.0 ui AQUA language (EN) collate en_US.UTF-8 tz America/New_York

Packages------------------------------------------------------------------------------ package * version date source bibtex 0.3.6 2013-07-29 CRAN (R 3.1.0) devtools * 1.5.0.9001 2014-09-16 Github (hadley/devtools@b9c619b) digest 0.6.4 2013-12-03 CRAN (R 3.1.0) evaluate 0.5.5 2014-04-29 CRAN (R 3.1.0) httr 0.5 2014-09-02 CRAN (R 3.1.1) knitcitations * 1.0.2 2014-09-23 Github (cboettig/knitcitations@6503acb) lubridate 1.3.3 2013-12-31 CRAN (R 3.1.0) memoise 0.2.1 2014-04-22 CRAN (R 3.1.0) plyr 1.8.1 2014-02-26 CRAN (R 3.1.0) Rcpp 0.11.2 2014-06-08 CRAN (R 3.1.0) RCurl 1.95.4.3 2014-07-29 CRAN (R 3.1.1) RefManageR 0.8.34 2014-08-19 CRAN (R 3.1.1) RJSONIO 1.3.0 2014-07-28 CRAN (R 3.1.1) rstudioapi 0.1 2014-03-27 CRAN (R 3.1.0) stringr 0.6.2 2012-12-06 CRAN (R 3.1.0) whisker 0.3.2 2013-04-28 CRAN (R 3.1.0) XML 3.98.1.1 2013-06-20 CRAN (R 3.1.0)

Cheers, Leo

— Reply to this email directly or view it on GitHub https://github.com/cboettig/knitcitations/issues/66.

Carl Boettiger UC Santa Cruz http://carlboettiger.info/

lcolladotor commented 10 years ago

Thank you very much for the great explanation! =)