11

I am trying to install rethinking

httr::set_config( httr::config( ssl_verifypeer = 0L ) ) 
with_config(use_proxy("http://myco.com:5555"), install_github("rmcelreath/rethinking", lib ="C://TOOLS/R-3.4.0/library"))

I get the error messages:

Downloading GitHub repo rmcelreath/rethinking@master
from URL https://api.github.com/repos/rmcelreath/rethinking/zipball/master
Installing rethinking
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) &&  : 
  missing value where TRUE/FALSE needed
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) &&  : 
  missing value where TRUE/FALSE needed

some info on my versions:

> packageVersion("devtools")
[1] ‘1.12.0’
> packageVersion("httr")
[1] ‘1.2.1’
> R.Version()$version.string
[1] "R version 3.4.0 (2017-04-21)"

Can you advise how to get the install to work?

Thank you.

++++++++++++++ WHEN I RUN TRACEBACK() I get

3: installed.packages()
2: as.data.frame(installed.packages(), stringsAsFactors = F)
1: (function () 
   {
       uniqueLibPaths <- .rs.uniqueLibraryPaths()
       x <- suppressWarnings(library(lib.loc = uniqueLibPaths))
       x <- x$results[x$results[, 1] != "base", ]
       pkgs.name <- x[, 1]
       pkgs.library <- x[, 2]
       pkgs.desc <- x[, 3]
       pkgs.url <- file.path("help/library", pkgs.name, "html", 
           "00Index.html")
       loaded.pkgs <- .rs.pathPackage()
       pkgs.loaded <- !is.na(match(normalizePath(paste(pkgs.library, 
           pkgs.name, sep = "/")), loaded.pkgs))
       instPkgs <- as.data.frame(installed.packages(), stringsAsFactors = F)
       pkgs.version <- character(length = length(pkgs.name))
       for (i in 1:length(pkgs.name)) {
           pkgs.version[[i]] <- .rs.packageVersion(pkgs.name[[i]], 
               pkgs.library[[i]], instPkgs)
       }
       pkgs.library <- .rs.createAliasedPath(pkgs.library)
       packages = data.frame(name = pkgs.name, library = pkgs.library, 
           version = pkgs.version, desc = pkgs.desc, url = pkgs.url, 
           loaded = pkgs.loaded, check.rows = TRUE, stringsAsFactors = FALSE)
       packages[order(packages$name), ]
   })()
user3022875
  • 8,598
  • 26
  • 103
  • 167
  • 1
    What's the `traceback`? What function is causing the error? Run `debugonce` on that function and figure out which of the conditions is failing and see if you can't suss out why – MichaelChirico May 18 '17 at 17:52
  • so debugonce(with_config(use_proxy("http://myco.com:5555"), install_github("rmcelreath/rethinking", lib ="C://TOOLS/R-3.4.0/library")))? – user3022875 May 18 '17 at 18:50
  • @MichaelChirico Please see update – user3022875 May 18 '17 at 19:38
  • 1
    @user3022875 This seems to be a general bug with 3.4.0. under windows. Try reinstalling the patched version, see if that helps.. https://cran.r-project.org/bin/windows/base/rpatched.html – Buggy May 19 '17 at 14:10
  • Wow just released today. I'll give it a shot. – user3022875 May 19 '17 at 20:11
  • That worked thanks! – user3022875 May 19 '17 at 20:56
  • Can't believe, its just patched today. – Ben May 20 '17 at 02:25
  • @user3022875 I have posted the comment as an answer for future reference, if somebody else find themselves in the same predicament. Can you checked it as answered? – Buggy May 22 '17 at 06:06
  • The idea of the patched version is that it is being updated almost every day. So, _Can't believe, its just patched today_ is not really true. – MS Berends May 22 '17 at 10:07
  • I might also happen that you can't view the help pages of some packages. That's fixed with the patched version too. – MS Berends May 22 '17 at 10:13

3 Answers3

24

This seems to be a general bug with 3.4.0. under Windows.

Try reinstalling the patched version, see if that helps..

https://cran.r-project.org/bin/windows/base/rpatched.html

Update: R 3.4.1. has been released. This might fix your problem as well. https://cran.r-project.org/bin/windows/base/

Buggy
  • 2,050
  • 21
  • 27
  • 1
    YOU, are amazing. Indeed an error of 3.4.0. I hope you get your checkmark; I'll just give you an upvote :) – MS Berends May 22 '17 at 10:08
  • Yes, thanks. For the record, [here's the note](http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2017/04/29#n2017-04-29) mentioning the bug fix. – Josh O'Brien May 24 '17 at 04:05
1

I have updated the devtools package to the last one v1.13.2 and I avoid this kind of error when you are trying to install new packages. And I dont' need to install another R version like 3.4.1.

Some info on version:

packageVersion("devtools")

[1] ‘1.13.2’

packageVersion("httr")

[1] ‘1.2.1’

R.Version()$version.string

[1] "R version 3.4.0 (2017-04-21)"

0

Desinstalling and reinstalling R3.4.0 has solved the problem for me. (I have to use R3.4.0 for external reasons, but it is probably a better idea to install a later version, cf mail from Uwe Ligges from the R-Core team https://www.mail-archive.com/r-help@r-project.org/msg243256.html )

Matt Dnv
  • 1,620
  • 13
  • 23