I'd like to install the package, but after loading I get the error of "S4Vectors 0.10.1" cannot be unloaded.
The problem is that IRange package requires S4Vectors of 0.11.2 version or higher.
I'd appreciate it if you help me fix this.
Here's my sessionInfo():
R version 3.3.0 (2016-05-03) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.4 LTS locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 [8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] BiocGenerics_0.18.0 rafalib_1.0.0 qvalue_2.4.2 genefilter_1.54.2 BiocInstaller_1.22.2 downloader_0.4 GSE5859Subset_1.0 devtools_1.11.1 loaded via a namespace (and not attached): [1] Rcpp_0.12.5 RColorBrewer_1.1-2 git2r_0.15.0 plyr_1.8.4 tools_3.3.0 digest_0.6.9 jsonlite_0.9.21 annotate_1.50.0 RSQLite_1.0.0 [10] memoise_1.0.0 gtable_0.2.0 lattice_0.20-33 Matrix_1.2-6 DBI_0.4-1 curl_0.9.7 withr_1.0.1 httr_1.1.0 stringr_1.0.0 [19] S4Vectors_0.11.5 IRanges_2.7.6 grid_3.3.0 Biobase_2.32.0 R6_2.1.2 AnnotationDbi_1.34.3 XML_3.98-1.1 survival_2.39-4 ggplot2_2.1.0 [28] reshape2_1.4.1 magrittr_1.5 scales_0.4.0 splines_3.3.0 xtable_1.8-2 colorspace_1.2-6 stringi_1.1.1 munsell_0.4.3 library(parathyroidSE) ##available from Bioconductor Loading required package: SummarizedExperiment Loading required package: GenomicRanges Loading required package: S4Vectors Error in unloadNamespace(package) : namespace ‘S4Vectors’ is imported by ‘AnnotationDbi’, ‘IRanges’, ‘genefilter’ so cannot be unloaded Error in library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc, : Package ‘S4Vectors’ version 0.10.1 cannot be unloaded
So R says in sessionInfo() that S4Vectors 0.11.5 is installed and loaded, but in the error message it says that it is trying to unload version 0.10.1! From the formatting it seems that the two parts fo the message are not verbatim from an R session, so it's a little hard to know the actual order of events here. My guess is that there are versions of S4Vectors installed in different locations, e.g., I have
so potentially two locations for S4Vectors. There are several scenarios where this might come up, e.g., making [2] not writable after installing S4Vectors into it. Even so, it's not clear when R would try to load two S4Vectors in the same session. But I think the best solution would be to locate all installed copies of S4Vectors and remove them, either with remove.packages("S4Vectors") repeatedly (confirming that this actually removes the packages -- I believe R is ambiguous about why it fails to remove a package that it cannot) or by using system commands to remove the package from the installed location.
Of course this breaks any packages that depend on S4Vectors, and you'd want to re-install a single version via biocLite().
And then whatever scenario lead to the S4Vectors situation might well affect other packages, and I'd quickly find myself losing patience and starting with a clean installation.