首先大家一开始都是根据官网下载
结果 不出意外 安装错误
The downloaded source packages are in
‘/tmp/Rtmpn7Kkd0/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(...) :
installation of package ‘nloptr’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘lme4’ had non-zero exit status
3: In install.packages(...) :
installation of package ‘pbkrtest’ had non-zero exit status
4: In install.packages(...) :
installation of package ‘car’ had non-zero exit status
5: In install.packages(...) :
installation of package ‘rstatix’ had non-zero exit status
6: In install.packages(...) :
installation of package ‘ggpubr’ had non-zero exit status
尝试了很多,终于搞定!
先conda下载这些
conda install -c conda-forge r-sf
conda install r-ggpubr
conda install r-nloptr
conda install r-lme4
conda install -c conda-forge udunits2
然后在R里面
install.packages("sf")
如果报错就install.packages("sf", configure.args = c("--with-gdal-config=/path/to/gdal-config", "--with-geos-config=/path/to/geos-config", "--with-proj-include=/path/to/proj/include", "--with-proj-lib=/path/to/proj/lib"))
最后本地安装devtools::install_local("/public/workspace/fanhaihua/monocle3-master.zip", dependencies = TRUE)
library(monocle3)