Conda安装R包以及devtools

基于conda安装R包以及devtools

Anaconda安装

https://www.anaconda.com/download#downloads
官网下载地址下载安装包再用xftp传输到需要安装的机器上

也可以使用wget+下载地址直接下载
安装
bash 下载的.sh文件
一路回车直到出现
Do you accept the license terms? [yes|no]
[no] >>> 
输入yes确认
安装位置选择
Anaconda3 will now be installed into this location:
/home/export/base/yxsc/zhouj/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/export/base/yxsc/zhouj/anaconda3] >>>

重新更改位置直接在>>>后面加上需要安装的位置

等待安装
安装完成后会显示
Installing base environment...


Downloading and Extracting Packages


Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: | 

    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py

    
                                                                                                                                                       ne
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> 

这里yes就帮你配置环境变量,如果你想要自己手动配置环境变量就选择no


安装完成
==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

查看版本
conda --version

创建启动R语言环境

conda create -n r_env r-base=3.6.0
r_env名字自行修改

conda activate r_env
启动环境

安装devtools

conda install -c r r-devtools
这会将所有需要用到的包和头文件全部加载完毕

测试安装

R
进入R语言
library(devtools)
测试是否安装完成,没有输出则安装完成,目前暂未遇到安装失败问题

备注

如提示缺少什么包可以用
conda install r-ggplot2安装确实的包文件,包名以r-开头
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值