.onLoad failed in loadNamespace() for 'BiocInstaller'
2
1
Entering edit mode
idomtamir ▴ 10
@idomtamir-7559
Last seen 7.4 years ago
Austria

Something has changed in my setup and now I have a problem running an old knitr analysis and I cant load vsn anymore within the Rnw file, but I can load it the same R session, script etc ... and then every script (also knitr) analysis runs without problems.

R session:

>knit("report.Rnw", "test.tex")
[...]
Error : .onLoad failed in loadNamespace() for 'BiocInstaller', details:
  call: url(paste0(.protocol(), "//bioconductor.org/BiocInstaller.dcf"))
  error: https:// URLs are not supported
Quitting from lines 14-24 (report.Rnw)
Error: package or namespace load failed for 'vsn'
>library("vsn")
>knit("report.Rnw", "test.tex")
[...]
>output file: test.tex
>[1] "test.tex"
> sessionInfo()

R version 3.2.1 (2015-06-18)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Debian GNU/Linux 7 (wheezy)

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C
[9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] vsn_3.38.0          Biobase_2.30.0      BiocGenerics_0.16.1
[4] knitr_1.13          optparse_1.3.2

loaded via a namespace (and not attached):
[1] Rcpp_0.12.3           magrittr_1.5          zlibbioc_1.16.0
[4] munsell_0.4.3         getopt_1.20.0         colorspace_1.2-6
[7] lattice_0.20-33       stringr_1.0.0         plyr_1.8.3
[10] tools_3.2.1           grid_3.2.1            gtable_0.2.0
[13] affy_1.48.0           preprocessCore_1.32.0 affyio_1.40.0
[16] ggplot2_2.1.0         formatR_1.3           evaluate_0.8.3
[19] limma_3.26.8          stringi_1.0-1         BiocInstaller_1.20.3
[22] scales_0.4.0

test.Rnw:

\documentclass{article}
...
<<global,include=FALSE,error=TRUE,echo=FALSE,cache=FALSE>>=
library("vsn")
mat <- matrix(1:1000,ncol=4)
vsnm <- justvsn(mat)
print(summary(vsnm))
@
\end{document}
software error knitr • 2.1k views
ADD COMMENT
2
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States

Work around this by setting options(useHTTPS=FALSE), or perhaps by loading BiocInstaller in a prior chunk without echo=FALSE, or update R.

vsn imports affy which imports BiocInstaller. BiocInstaller tries to determine whether it can use HTTPS, and remembers the answer to that.

In your version of R BiocInstaller consults the useHTTPS option. If it is not set, it checks for unexpected output returned by an attempt to use https, if there is no output, it decides that https is supported. I'm guessing that the knitr option echo=FALSE captures the output stream ahead of BiocInstaller, so the output stream that BiocInstaller checks is empty even though https failed. More recent versions of R use messages rather than printed output, so BIocInstaller doesn't have to capture the output stream.

A lot of the preceding is guesswork, so please let us know if you find a solution.

ADD COMMENT
0
Entering edit mode

Thanks! the option(useHTTPS=FALSE) in my knitr driver script works. Wierd though, because it worked without it for a long time.

ADD REPLY
1
Entering edit mode

Likely you have a newer version of BiocInstaller() than you previously had. The newer version tries to read configuration information from the web rather than locally.

ADD REPLY
0
Entering edit mode
@herve-pages-1542
Last seen 7 days ago
Seattle, WA, United States

Hi,

I don't know what's going on (hopefully someone else will have some insight on this) but it seems that you are running BioC 3.2. Please be aware that this is not the current release version of Bioconductor which is BioC 3.3 and runs on R 3.3. Since older BioC versions are not supported, it is highly recommended that you update your installation.

Cheers,

H.

ADD COMMENT

Login before adding your answer.

Traffic: 549 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6