1、在Linux终端窗口打开R:liyi@liyi:~ > R
2、运用install.packages()函数安装软件包,并且选择镜像,我选择了”中国厦门“作为镜像R version 3.0.2 (2013-09-25) -- "Fr足毂忍珩isbee Sailing"Copyright (C) 2013 The R Foundation for Statistical ComputingPlatform: 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 localeR 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")
3、镜像选择好了以后,函数就在R软件自行下载相关依赖包配置环境:> install.packages("randomForest")Installing package into ‘/home/liyi/R/x86_64-pc-linux-gnu-library/3.0’(as ‘lib’ is unspecified)
4、以上步骤完成以后,只需要最后一步即可:> library(random掂迎豢畦Forest) randomForest 4.6-12 Type rfNews() to see new features/changes/bug fixes. 至此randomForest软件包已经安装好了,用户即可调用软件包的函数来完成自己的数据分析工作了。