1

I had previously installed haven from CRAN, but then installed haven from Github using

devtools::install_github("hadley/haven")

and wanted to check whether I got the correct version. sessionInfo() says, among other things:

other attached packages:
[1] haven_0.2.0 

However, this is also the version from CRAN. How can I be sure this is the current version from Github?

FooBar
  • 13,456
  • 10
  • 65
  • 140
  • 1
    Did you `library(haven)`? It shouldn't show up there until you do. After you do, the latest installed version will show up. – David Arenburg Apr 11 '15 at 18:24
  • @DavidArenburg I see. However, my question was merely how do I distinguish between CRAN and Github. If I knew the Github version number, this was correct. Since I don't, daroczig's answer helps. – FooBar Apr 11 '15 at 18:26
  • 2
    As an aside, if folks used (local or GitHub) repos (which eg [drat](http://dirk.eddelbuettel.com/code/drat.html) makes easy) then version number comparison would still work. This is a devtools / GitHub issues of not using proper R tools for tracking packages. – Dirk Eddelbuettel Apr 11 '15 at 18:26
  • 1
    @FooBar: But you [do know the GH version number](https://github.com/hadley/haven/blob/master/DESCRIPTION#L2). – Dirk Eddelbuettel Apr 11 '15 at 18:27

1 Answers1

4

Use session_info from the devtools package:

> devtools::session_info()
Session info -------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.3 (2015-03-09)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       <NA>                        

Packages -----------------------------------------------------------------------
 package    * version date       source                           
 devtools   * 1.7.0   2015-01-17 CRAN (R 3.1.2)                   
 digest     * 0.6.8   2014-12-31 CRAN (R 3.1.2)                   
 pander       0.5.2   2015-04-11 Github (rapporter/pander@f69fe62)
 Rcpp       * 0.11.5  2015-03-06 CRAN (R 3.1.2)                   
 rstudioapi * 0.3.1   2015-04-07 CRAN (R 3.1.3)                   
daroczig
  • 26,353
  • 6
  • 84
  • 122