Linux系统下如何给R软件安装软件包

 时间:2026-02-14 22:08:59

1、在Linux终端窗口打开R:

liyi@liyi:~ > R

2、运用install.packages()函数安装软件包,并且选择镜像,我选择了”中国厦门“作为镜像

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"

Copyright (C) 2013 The R Foundation for Statistical Computing

Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.

> install.packages("randomForest")

Linux系统下如何给R软件安装软件包

3、镜像选择好了以后,函数就在R软件自行下载相关依赖包配置环境:

> install.packages("randomForest")

Installing package into ‘/home/liyi/R/x86_64-pc-linux-gnu-library/3.0’

(as ‘lib’ is unspecified)

Linux系统下如何给R软件安装软件包

4、以上步骤完成以后,只需要最后一步即可:

> library(randomForest)                                                                                                                                

randomForest 4.6-12                                                                                                                                    

Type rfNews() to see new features/changes/bug fixes.     

至此randomForest软件包已经安装好了,用户即可调用软件包的函数来完成自己的数据分析工作了。

Linux系统下如何给R软件安装软件包

  • 中暑里怎样急救?
  • 直面高考迎接挑战
  • 九种食物预防心脑血管疾病
  • 中国银行企业贷款利率有什么规定
  • 非上市公司股权激励如何定行权价格?
  • 热门搜索
    怎么更改文件格式 计生证明怎么开 牛肚怎么洗 首都博物馆官网 乌龟蛋怎么孵化 小孩流清鼻涕怎么办 电焊打眼睛怎么办 容易感冒 结肠炎怎么办 产后怎么减肥