(已解決)library(DESeq2)錯誤:Error in loadNamespace: no package called ""s

1,091 views
Skip to first unread message

Iris.c

unread,
May 20, 2019, 6:40:37 AM5/20/19
to taiwa...@googlegroups.com
Hi all,


library(DESeq2)
時產生以下錯誤訊息:

    
   Loading required package: S4Vectors
   Loading required package: stats4
   Loading required package: BiocGenerics
   Loading required package: parallel

    Attaching package: BiocGenerics

    The following objects are masked from package:parallel’:

       clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
       clusterExport, clusterMap, parApply, parCapply, parLapply,
       parLapplyLB, parRapply, parSapply, parSapplyLB

    The following objects are masked from package:stats’:

        IQR, mad, xtabs

    The following objects are masked from package:base’:

       anyDuplicated, append, as.data.frame, cbind, colnames, do.call,
       duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,
       is.unsorted, lapply, lengths, Map, mapply, match, mget, order,
       paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,
       Reduce, rownames, sapply, setdiff, sort, table, tapply, union,
       unique, unsplit, which, which.max, which.min


    Attaching package: S4Vectors

    The following objects are masked from package:base’:

        colMeans, colSums, expand.grid, rowMeans, rowSums

   Loading required package: IRanges
   Loading required package: GenomicRanges
   Loading required package: GenomeInfoDb
   Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
      there is no package called RCurl
   In addition: Warning messages:
    1: package DESeq2 was built under R version 3.3.2
    2: package S4Vectors was built under R version 3.3.3
    3: package BiocGenerics was built under R version 3.3.1
    4: package IRanges was built under R version 3.3.3
    5: package GenomicRanges was built under R version 3.3.3
    6: package GenomeInfoDb was built under R version 3.3.2
    Error: package GenomeInfoDb could not be loaded


嘗試安裝Rcurl (install.packages("RCurl")) 在library一次後仍跳出類似的找不到package的錯誤訊息,如下:

    
   Loading required package: GenomicRanges
   Loading required package: GenomeInfoDb
   Loading required package: SummarizedExperiment
   Loading required package: Biobase
   Welcome to Bioconductor

        Vignettes contain introductory material; view with
       'browseVignettes()'. To cite Bioconductor, see
       'citation("Biobase")', and for packages 'citation("pkgname")'.

    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
      there is no package called Hmisc
   In addition: Warning messages:
    1: package DESeq2 was built under R version 3.3.2
    2: package GenomicRanges was built under R version 3.3.3
    3: package GenomeInfoDb was built under R version 3.3.2
    4: package SummarizedExperiment was built under R version 3.3.1
    5: package Biobase was built under R version 3.3.1
    Error: package or namespace load failed for DESeq2


因為使用下載其他package時也一直遇到類似問題,所以想可能主要原因不是錯誤訊息裡提到的找不到package或package無法載入這些原因,大家是否知道可以如何處理這樣的問題。

以下是我的電腦, R及RStudio版本:

macOS Mojave 10.14.3
R 3.3.0
RStudio 1.2.1335

任何意見皆萬分感激,謝謝。

WEPA ^_^

unread,
May 20, 2019, 11:47:03 AM5/20/19
to R軟體使用者論壇
Hi Iris,

剛才在 Mac 10.12.6 的OS之中, 使用R-3.5.3 安裝多次, 都會有類似的錯誤, 最後將R/RStudio 都更新至最新版本(R-3.6.0, RStudio-1.2.1335), 則使用以下指令即可安裝:

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
BiocManager::install("DESeq2")

# 測試畫面1

fig1.install.png



# 測試畫面2: 輸入 Yes 就是要安裝

fig2.install2.png



# 測試畫面3: 輸入 a 全部更新

fig3.install3.png



# 測試畫面4: plotMA{DESeq2} 可以繪圖

fig4.example.png



# 完整測試程式
# title: mac install DESeq2 package
# date: 2019.5.20

# 舊版安裝會有問題,將R更新至最新版R-3.6.0, RStudio更新至最新版RStudio-1.2.1335

# 作業系統與R版本
sessionInfo()

# 安裝DESeq2套件
if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

BiocManager::install("DESeq2")

# 線上說明
browseVignettes("DESeq2")

# 測試DESeq2套件
library(DESeq2)
dds <- makeExampleDESeqDataSet()
dds <- DESeq(dds)
plotMA(dds)
# end


Iris.c於 2019年5月20日星期一 UTC+8下午6時40分37秒寫道:

Iris.c

unread,
May 20, 2019, 10:45:51 PM5/20/19
to R軟體使用者論壇
問題解決了!!謝謝你

WEPA ^_^於 2019年5月20日星期一 UTC+8下午11時47分03秒寫道:
Reply all
Reply to author
Forward
0 new messages