From thierry.onkelinx at inbo.be  Wed Mar  2 10:16:28 2016
From: thierry.onkelinx at inbo.be (Thierry Onkelinx)
Date: Wed, 2 Mar 2016 10:16:28 +0100
Subject: [Rd] install.packages() fails with drat repository on networkdrive
Message-ID: <CAJuCY5w-BC8ePSD_-g=tcRiWgtQ9ik-FSaDWz1WwZLtC4yKBcw@mail.gmail.com>

Dear all,

install.packages("lme4") fails with error
Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning message:
In read.dcf(file = tmpf) :
  cannot open compressed file
'//servername/repository_path/bin/windows/contrib/3.2/PACKAGES',
probable reason 'No such file or directory'

the repositories set in .Rprofile are
"http://lib.ugent.be/CRAN/" "file://servername/repository_path"

There is a file PACKAGES.gz at
//servername/repository_path/bin/windows/contrib/3.2/ but no file
PACKAGES

I'm not sure if this is
1) a bug in the drat package: not creating PACKAGES
2) a bug in read.dcf(): not looking if PACKAGES.gz is present
3) a bug in available.packages(). Debugging install.packages()
indicates that the error occurs at the line below with type <-
"win.binary", repos <- getOption("repos") and missing(method) == TRUE

av2 <- available.packages(contriburl = contrib.url(repos, type2),
method = method)

It would be nice if available.packages() handled an error returned by
read.dcf() more gracefully. An error with one repository now
completely blocks install.packages()

sessionInfo("drat")
R version 3.2.3 (2015-12-10)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Dutch_Belgium.1252  LC_CTYPE=Dutch_Belgium.1252
LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C
LC_TIME=Dutch_Belgium.1252

attached base packages:
character(0)

other attached packages:
[1] drat_0.1.0.1

loaded via a namespace (and not attached):
[1] graphics_3.2.3  tools_3.2.3     utils_3.2.3     grDevices_3.2.3
stats_3.2.3     datasets_3.2.3  methods_3.2.3   base_3.2.3
fortunes_1.5-3


Best regards,


ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey



[Rd] install.packages() fails with drat repository on networkdrive
Thierry Onkelinx