简体   繁体   中英

R won't load installed package, citing errors that other packages must be unloaded first (and that they can't be unloaded)

I deeply don't understand the problem I am facing here and likely am not posting enough information, please be patient as I update/respond to comments... Thank you,

I've recently tried installing the package "metagenomeSeq" (URL: http://www.cbcb.umd.edu/software/metagenomeSeq ). This package uses its own installation routines, using the R script biocLite to install:

source("http://bioconductor.org/biocLite.R")
biocLite("metagenomeSeq")

Installation is apparently successful:

> biocLite("metagenomeSeq")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.1), R 3.2.5 (2016-04-14).
Installing package(s) ‘metagenomeSeq’
...
[snippped]
...
* installing *source* package ‘metagenomeSeq’ ...
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (metagenomeSeq)

However, attempting to load the packages yields the following:

> library("metagenomeSeq")
Loading required package: Biobase
Error in unloadNamespace(package) : 
  namespace ‘Biobase’ is imported by ‘DESeq2’, ‘genefilter’, ‘multtest’, ‘annotate’, ‘geneplotter’, ‘AnnotationDbi’ so cannot be unloaded
Error in library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,  : 
  Package ‘Biobase’ version 2.26.0 cannot be unloaded

I am using R v3.2.5 and Rstudio v099.491. Operating system: Ubuntu 14.04. Packages are:

library("scales")
library("ape")
library("ggplot2")
library("RColorBrewer")
library("igraph")
library("vegan")
library("gridExtra")
library("cowplot")
library("RAM")
library("plyr")
library("stringr")
library("gridExtra")
library("ggdendro")
library("reshape2")
library("xtable")
library("knitr")
library("phyloseq")
library("indicspecies")

Edit 1:

The package loads when I open up a fresh instance of R studio without loading any other packages first. Is it possible for an R's packages dependencies to have conflicts with other packages that require their dependencies to be unloaded? I've never come across this before.

Edit 2: Included packages I was using.

懒惰修复:删除库“重塑”和“ RAM”( RAM取决于重塑 )减轻了我的问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM