0
点赞
收藏
分享

微信扫一扫

R语言及一些包的安装

 

1)dnf install R
2) R
install.packages("getopt")
.packages(all.available = T)
install.packages("BiocManager")
3)
dnf install openssl-devel
4)
BiocManager::install("org.Mm.eg.db")
BiocManager::install("org.Hs.eg.db")
5)
BiocManager::install("clusterProfiler")
packageVersion("rvcheck")
remove.packages("rvcheck")
packageurl <- "https://cran.r-project.org/src/contrib/Archive/rvcheck/rvcheck_0.1.8.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
BiocManager::install("clusterProfiler")

 

1)dnf install R
2)R -e "install.packages('getopt', repos='https://cran.r-project.org/')"
3)R -e "install.packages('BiocManager', repos='https://cran.r-project.org/')"
4)dnf install -y openssl-devel
5)R -e "BiocManager::install('org.Mm.eg.db')"
6)R -e "BiocManager::install('org.Hs.eg.db')"
7)R -e "BiocManager::install('clusterProfiler')"
8)R -e "remove.packages('rvcheck')"

9)R -e "install.packages('https://cran.r-project.org/src/contrib/Archive/rvcheck/rvcheck_0.1.8.tar.gz', repos=NULL, type='source')"

10)R -e "BiocManager::install('clusterProfiler')"

 由于dnf安装的最新版本还是老,所以源码安装

参考资料:https://zhuanlan.zhihu.com/p/419947930   
我在make时报错了:conftest.c:1:10: fatal error: jni.h: No such file or directory,在网上没有合适的解决方案,后来发现上面装的老版本镜像里有jni.h,
于是直接把老版本里的拷贝到了当前镜像的目录里,再make就成功了,后面的步骤也都成功了

docker cp install_r24:/usr/lib/jvm/java-11-openjdk-11.0.15.0.10-1.fc34.x86_64/include ./
docker cp include install_r_source:/usr/lib/jvm/java-11-openjdk-11.0.15.0.10-1.fc34.x86_64/
=====
dnf install yum-utils
yum-builddep R
mkdir -p /opt/R/
./configure --prefix=/opt/R/4.1.1 --enable-memory-profiling --enable-R-shlib --with-blas --with-lapack
make
#加一步拷贝include:
make install
make clean #清理残余
ls /opt/R/4.1.1/
ln -s /opt/R/4.1.1/bin/R /usr/local/bin/R
ln -s /opt/R/4.1.1/bin/Rscript /usr/local/bin/Rscript

 

举报

相关推荐

0 条评论