提问人:B. Frost 提问时间:10/25/2022 更新时间:11/1/2022 访问量:969
在 loadNamespace 中更新后使用 R 时出现问题
Problems using R after update in loadNamespace
问:
我是R的新手,主要使用Seurat软件包来评估我的单细胞RNAseq数据。 今天我想更新 R 版本和 RStudio。在那之后,我在使用已安装的软件包时遇到了问题。这是我的问题:
> install.packages("Seurat", dependencies = TRUE)
Installing package into ‘C:/Users/benne/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘S4Vectors’, ‘SummarizedExperiment’, ‘SingleCellExperiment’, ‘MAST’, ‘DESeq2’, ‘BiocGenerics’, ‘GenomicRanges’, ‘GenomeInfoDb’, ‘IRanges’, ‘rtracklayer’, ‘monocle’, ‘Biobase’, ‘limma’ are not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/Seurat_4.2.0.zip'
Content type 'application/zip' length 2376157 bytes (2.3 MB)
downloaded 2.3 MB
package ‘Seurat’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\benne\AppData\Local\Temp\RtmpIlveV0\downloaded_packages
> library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘spatstat.data’
我认为,Seurat-package 的安装没有问题,但我无法使库功能正常工作。我找到了其他试图解决这个问题的主题,但它们对我没有帮助。
可能是什么问题?使用旧的 R/RStudio 版本,一切正常。更新后,我不得不安装 RTools42,因为它说我必须这样做。我以前从未这样做过,为什么是今天??
我真的希望,你们可以帮助我。我完全迷路了!!
附上我的sessionInfo():
> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8
[4] LC_NUMERIC=C LC_TIME=German_Germany.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.4.4 tidyr_1.2.1 viridisLite_0.4.1 jsonlite_1.8.2 splines_4.2.1
[6] leiden_0.4.3 shiny_1.7.2 sp_1.5-0 ggrepel_0.9.1 globals_0.16.1
[11] pillar_1.8.1 lattice_0.20-45 glue_1.6.2 reticulate_1.26 digest_0.6.29
[16] RColorBrewer_1.1-3 promises_1.2.0.1 colorspace_2.0-3 plyr_1.8.7 cowplot_1.1.1
[21] htmltools_0.5.3 httpuv_1.6.6 Matrix_1.5-1 pkgconfig_2.0.3 listenv_0.8.0
[26] purrr_0.3.5 xtable_1.8-4 patchwork_1.1.2 scales_1.2.1 RANN_2.6.1
[31] later_1.3.0 Rtsne_0.16 spatstat.utils_2.3-1 tibble_3.1.8 generics_0.1.3
[36] ggplot2_3.3.6 ellipsis_0.3.2 ROCR_1.0-11 pbapply_1.5-0 SeuratObject_4.1.2
[41] lazyeval_0.2.2 cli_3.4.1 survival_3.3-1 magrittr_2.0.3 mime_0.12
[46] future_1.28.0 fansi_1.0.3 parallelly_1.32.1 MASS_7.3-57 ica_1.0-3
[51] progressr_0.11.0 tools_4.2.1 fitdistrplus_1.1-8 data.table_1.14.2 lifecycle_1.0.3
[56] matrixStats_0.62.0 stringr_1.4.1 plotly_4.10.0 munsell_0.5.0 cluster_2.1.3
[61] irlba_2.3.5.1 compiler_4.2.1 rlang_1.0.6 scattermore_0.8 grid_4.2.1
[66] ggridges_0.5.4 RcppAnnoy_0.0.19 htmlwidgets_1.5.4 igraph_1.3.5 miniUI_0.1.1.1
[71] gtable_0.3.1 codetools_0.2-18 reshape2_1.4.4 R6_2.5.1 gridExtra_2.3
[76] zoo_1.8-11 dplyr_1.0.10 fastmap_1.1.0 future.apply_1.9.1 rgeos_0.5-9
[81] utf8_1.2.2 KernSmooth_2.23-20 stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[86] sctransform_0.3.5 vctrs_0.4.2 png_0.1-7 tidyselect_1.2.0 lmtest_0.9-40
非常感谢!
我试图找出问题可能是什么。我希望 RTools42 的安装可以工作,但这并不能使它变得更好。错误仍然发生。
答:
0赞
Masa Sato
10/26/2022
#1
我今天(2022 年 10 月 26 日)安装 R、RStudio 和 Seurat 时遇到了类似的问题。
(几周前我在另一台计算机上没有遇到问题)。 说我应该安装 RTools。
我这样做了,并且在执行时收到了与您类似的错误消息。
然后,我执行了.
RTools 不得不重新编译各种东西 (gcc),但最终运行顺利。install.packages('Seurat')
library(Seurat)
install.packages('spatstat.data')
library(Seurat)
0赞
MegPerrett
10/26/2022
#2
升级到 R-4.2.1 后,我也遇到了问题。以下步骤帮助我解决了这个问题:
- 成功安装 R 工具后重新启动计算机
- 运行以下命令
install.packages('spatstat.data')
install.packages('spatstat.core')
在 RTools 结束后,正如 Maso Sato 在回答中提到的那样进行编译
Library(Seurat)应该可以加载!
评论