-----Original Message-----
From: Martin Morgan [mailto:martin.mor...@roswellpark.org]
Sent: Tuesday, 11 April 2017 7:20 PM
To: Gordon K Smyth <sm...@wehi.edu.au>; bioc-devel@r-project.org
Subject: Re: [Bioc-devel] Using BiocInstaller with R 3.4.0 beta
On 04/11/2017 05:01 AM, Gordon K Smyth wrote:
The problem appears to be with installed.packages(). If I start a
fresh R
3.4.0beta session, then I can run installed.packages() once with
correct results,
but running it a second time gives the error message:
installed.packages()
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib)
&& :
missing value where TRUE/FALSE needed
The test is in this code chunk, from utils/R/packages.R
for(lib in lib.loc) {
if(noCache) {
ret0 <- .readPkgDesc(lib, fields)
if(length(ret0)) retval <- rbind(retval, ret0)
} else {
## Previously used URLencode for e.g. Windows paths with
drives
## This version works for very long file names.
base <- paste(c(lib, fields), collapse = ",")
## add length and 64-bit CRC in hex (in theory, seems
## it is actually 32-bit on some systems)
enc <- sprintf("%d_%s", nchar(base), .Call(C_crc64, base))
dest <- file.path(tempdir(), paste0("libloc_", enc,
".rds"))
if(file.exists(dest) &&
file.mtime(dest) > file.mtime(lib) &&
(val <- readRDS(dest))$base == base)
## use the cache file
retval <- rbind(retval, val$value)
else {
ret0 <- .readPkgDesc(lib, fields)
if(length(ret0)) {
retval <- rbind(retval, ret0)
## save the cache file
saveRDS(list(base = base, value = ret0), dest)
}
}
}
where 'lib' is one of .libPaths(), 'dest' is one of
dir(tempdir(), pattern="libloc_", full=TRUE)
and 'base' should be a character(1)
I think the code chunk has tried to cache the packages installed in each
directory of .libPaths() (the saveRDS() line), and these are somehow
corrupted on the second time through (I guess evaluating the
readRDS()??).
For instance I have two paths in .libPaths() and after the first
install.packages() I have
> str(readRDS(dir(tempdir(), full=TRUE)[1]))
List of 2
$ base : chr
"/home/mtmorgan/bin/R-3-4-
branch/library,Version,Priority,Depends,Imports,LinkingTo,Suggests,Enhances,Li
cense,Li"|
__truncated__
$ value: chr [1:29, 1:17] "base" "boot" "class" "cluster" ...
> str(readRDS(dir(tempdir(), full=TRUE)[2]))
List of 2
$ base : chr
"/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.4-Bioc-
3.5,Version,Priority,Depends,Imports,LinkingTo,Suggests,E"|
__truncated__
$ value: chr [1:513, 1:17] "abind" "acepack" "aCGH" "ADaCGH2" ...
I'm guessing that one of these files is corrupted somehow, but it's not
obvious how. Can you use options(error=recover) and find the values that
cause the conditional to fail?
Martin
-----Original Message-----
From: Gordon K Smyth
Sent: Tuesday, 11 April 2017 6:26 PM
To: bioc-devel@r-project.org
Subject: Using BiocInstaller with R 3.4.0 beta
I thought I would test out R 3.4.0 beta (for Windows) but now I
can't use the
BiocInstaller package. Attempts to use biocLite() or biocValid()
lead to an
error
message as shown below.
What have I overlooked?
Thanks
Gordon
sessionInfo()
R version 3.4.0 beta (2017-04-08 r72499)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0
remove.packages("BiocInstaller")
Removing package from 'C:/lib/R/R-3.4.0beta/library'
(as 'lib' is unspecified)
Error in find.package(pkgs, lib) :
there is no package called 'BiocInstaller'
source("https://urldefense.proofpoint.com/v2/url?u=https-3A__bioconductor.org_biocLite.R&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qQj20RkrlTIRAItC1ZQMStpDs5hOqJaHLGXLTycSugE&s=6ODigHgwIN79ejt5MJf2kpj1UREzVRkiKBpOWsY_J-I&e=
")
trying URL
'https://urldefense.proofpoint.com/v2/url?u=https-3A__bioconductor.org_packages_3.5_bioc_bin_windows_contrib_3.4_BiocInst&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qQj20RkrlTIRAItC1ZQMStpDs5hOqJaHLGXLTycSugE&s=n0cklbnoQ9a2xy8zQvs0mMdS3tP5gk2NbVWsALYoXOk&e=
aller_1.25.3.zip'
Content type 'application/zip' length 127489 bytes (124 KB)
downloaded 124 KB
package 'BiocInstaller' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\smyth\AppData\Local\Temp\RtmpOUhCbB\downloaded_packages
Bioconductor version 3.5 (BiocInstaller 1.25.3), ?biocLite for help
BiocInstaller::biocValid()
Error in if (file.exists(dest) && file.mtime(dest) >
file.mtime(lib) && :
missing value where TRUE/FALSE needed
---------------------------------------------
Professor Gordon K Smyth,
Head, Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.statsci.org_smyth&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qQj20RkrlTIRAItC1ZQMStpDs5hOqJaHLGXLTycSugE&s=N8BZ6_dazp5kboftdMZCE4ip8G9ORI9zTd8TVRI4eB0&e=
_______________________________________________
Bioc-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qQj20RkrlTIRAItC1ZQMStpDs5hOqJaHLGXLTycSugE&s=f74EDfuo7C_LCPCfcGAREY8dqBJwwjc5DqM7YF7Tvg4&e=
This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the
employee or agent
responsible for the delivery of this message to the intended
recipient(s), you are
hereby notified that any disclosure, copying, distribution, or use of
this email
message is prohibited. If you have received this message in error,
please notify
the sender immediately by e-mail and delete this email message from your
computer. Thank you.