安装R包的核心思想就是,先install.packages("scCustomize"),如果失败则去Anaconda
> install.packages("scCustomize")
Installing package into ‘/s1/Program/anaconda3/envs/public/lib/R/library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘snakecase’, ‘prismatic’, ‘Matrix’, ‘ggprism’, ‘janitor’, ‘paletteer’, ‘SeuratObject’
trying URL 'https://cran.rstudio.com/src/contrib/snakecase_0.11.1.tar.gz'
Content type 'application/x-gzip' length 457817 bytes (447 KB)
==================================================
downloaded 447 KB
trying URL 'https://cran.rstudio.com/src/contrib/prismatic_1.1.1.tar.gz'
Content type 'application/x-gzip' length 701517 bytes (685 KB)
==================================================
downloaded 685 KB
trying URL 'https://cran.rstudio.com/src/contrib/Matrix_1.6-5.tar.gz'
Content type 'application/x-gzip' length 2883851 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
trying URL 'https://cran.rstudio.com/src/contrib/ggprism_1.0.4.tar.gz'
Content type 'application/x-gzip' length 2788454 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
trying URL 'https://cran.rstudio.com/src/contrib/janitor_2.2.0.tar.gz'
Content type 'application/x-gzip' length 236408 bytes (230 KB)
==================================================
downloaded 230 KB
trying URL 'https://cran.rstudio.com/src/contrib/paletteer_1.6.0.tar.gz'
Content type 'application/x-gzip' length 2476216 bytes (2.4 MB)
==================================================
downloaded 2.4 MB
trying URL 'https://cran.rstudio.com/src/contrib/SeuratObject_5.0.1.tar.gz'
Content type 'application/x-gzip' length 747880 bytes (730 KB)
==================================================
downloaded 730 KB
trying URL 'https://cran.rstudio.com/src/contrib/scCustomize_2.1.2.tar.gz'
Content type 'application/x-gzip' length 844737 bytes (824 KB)
==================================================
downloaded 824 KB
其实这个包有时候就可以这样按,只是需要安装几个依赖
# 根据报错提示安装相应的包以及版本
install.packages("rlang", version = "1.1.3")
#进入 conda 环境,再安装也是一样的。
mamba install genomedk::r-sccustomize
or
conda install genomedk::r-sccustomize