R语言 教程
- 第1节:R语言 概述
- 第2节:R语言 环境设置
- 第3节:R语言 基本语法
- 第4节:R语言 数据类型
- 第5节:R语言 变量
- 第6节:R语言 运算符
- 第7节:R语言 决策
- 第8节:R语言 包
- 第9节:R语言 循环
- 第10节:R语言 数据重塑
- 第11节:R语言 函数
- 第12节:R语言 字符串
- 第13节:R语言 向量
- 第14节:R语言 列表
- 第15节:R语言 矩阵
- 第16节:R语言 数组
- 第17节:R语言 因子
- 第18节:R语言 数据帧
- 第19节:R语言 条形图
- 第20节:R语言 箱线图
- 第21节:R语言 直方图
- 第22节:R语言 折线图
- 第23节:R语言 散点图
- 第24节:R语言 饼状图
- 第25节:R语言 CSV文件
- 第26节:R语言 Excel文件
- 第27节:R语言 二进制文件
- 第28节:R语言 XML文件
- 第29节:R语言 JSON文件
- 第30节:R语言 Web数据
- 第31节:R语言 数据库
- 第32节:R语言 平均值,中位数和模式
- 第33节:R语言 线性回归
- 第34节:R语言 多重回归
- 第35节:R语言 逻辑回归
- 第36节:R语言 标准分布
- 第37节:R语言 二项分布
- 第38节:R语言 泊松回归
- 第39节:R语言 协方差分析
- 第40节:R语言 时间序列分析
- 第41节:R语言 非线性最小二乘
- 第42节:R语言 决策树
- 第43节:R语言 随机森林算法
- 第44节:R语言 生存分析
- 第45节:R语言 卡方检验
R语言 环境设置
本地环境设置
如果你愿意为本地设置R语言环境,你可以按照下面的步骤。
Windows安装
去 R 语言下载的镜像站点的列表下载
选择版本进行下载
点击运行,进入安装界面
一路默认,安装完毕!
Linux安装
R语言适用于多版本的Linux系统。
各版本Linux的各有不同。具体的安装步骤在上述资源中有对应的教程。但是,如果你是在赶时间,那么你可以用yum命令,如下所示的安装指令
安装R
$ yum install R
以上命令将安装R编程的核心功能与标准包,额外的包需要另外安装,而后你可以按如下提示启动R。
$ R
R version 3.2.0 (2015-04-16) -- "Full of Ingredients"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-redhat-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.
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.
>
现在,您可以在R语言提示符下使用install命令安装所需的软件包。 例如,以下命令将安装为3D图表所需的plotrix软件包。
> install.packages("plotrix")