logo资料库

R语言入门经典中文版.pdf

第1页 / 共77页
第2页 / 共77页
第3页 / 共77页
第4页 / 共77页
第5页 / 共77页
第6页 / 共77页
第7页 / 共77页
第8页 / 共77页
资料共77页,剩余部分请下载后查看
导言
基本原理与概念
基本原理
对象的产生,排列及删除
在线帮助
R的数据操作
对象
在文件中读写数据
存储数据
生成数据
规则序列
随机序列
使用对象
创建对象
对象的类型转换
运算符
访问一个对象的数值:下标系统
访问对象的名称
数据编辑器
数学运算和一些简单的函数
矩阵计算
R绘图
管理绘图
打开多个绘图设备
图形的分割
绘图函数
低级绘图命令
绘图参数
一个实例
grid 和 lattice 包
R的统计分析
关于方差分析的一个简单例子
公式
泛型函数
R编程实践
循环和向量化
用R写程序
编写你自己的函数
R 相关的文献
kandao
R for Beginners Chinese Edition 2.0 Emmanuel Paradis Institut des Sciences de l’ ´Evolution Universit´e Montpellier II F-34095 Montpellier c´edex 05 France E-mail: paradis@isem.univ-montp2.fr Co-translated by: XF Wang, YH Xie, JT Li and GH Ding
“R for beginners”R 20022005 Emmanuel ParadisLATEX Chap1–2: Chap3: Chap4: Chap5–7: Rpwxf@hotmail.com 20064 c∞ 2002, 2005, Emmanuel Paradis Permission is granted to make and distribute copies, either in part or in full and in any language, of this document on any support provided the above copyright notice is included in all copies. Permission is granted to translate this document, either in part or in full, in any language provided the above copyright notice is included.
1 2 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 . . . . . . . . . . . . . . . . . . . . . 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 R 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 . . . . . . . . . . . . . . . . . . . . . . 3.5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 . . . . . . . . . . . . . 3.5.5 . . . . . . . . . . . . . . . . . . . . . . 3.5.6 . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.7 . . . . . . . . . . . . . . . . 3.5.8 . . . . . . . . . . . . . . . . . . . . . . . . . . 4 R 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 . . . . . . . . . . . . . . . . . . . . . 4.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 grid lattice . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 3 5 7 9 9 11 14 15 15 18 19 19 24 26 27 30 32 32 34 37 37 37 38 41 42 44 45 49
5 R 5.1 . . . . . . . . . . . . . . . . . . . 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 R 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . 7 R 56 56 58 59 62 65 65 67 68 72
1 R. RR RRoss Ihaka Robert Gentleman1RAT&T S1R SInsightful2S-PLUSRS Ihaka & Gentleman (1996) R-FAQ3R RGNUGeneral Public Licence4 RR Development Core Team RUnix Linux (CFortran )Windows, LinuxMacintosh Comprehensive R Archive Network (CRAN)5 Linux LinuxCRAN R (jpg, png, bmp, ps, pdf, emf, pictex, xfig; ) (P-) R R S6,R RR R “object” 1Ihaka R. & Gentleman R. 1996. R: a language for data analysis and graphics. Journal of Computational and Graphical Statistics 5: 299–314. 2 http://www.insightful.com/products/splus/default.asp 3http://cran.r-project.org/doc/FAQ/R-FAQ.html 4For more information: http://www.gnu.org/ 5http://cran.r-project.org/ 6For example: http://stat.cmu.edu/S/ 1
20 R 20 R 2
2 R R‘>’Windows Rgui.exe( . . . ) R R (“assign”) (object) .R 2.1 R R (CFortan, Pascal, . . . ) Rlm(y ~ x) “xy”R (,ls()) R (object) R(objects) ()() (p. 26). R arguments °! options °! function " default arguments =)result (argument)(. . . ) R 3
R R (p. 68) R, (Fig. 1) () keyboard mouse commands - functions and operators æ æ - .../library/base/ /stast/ /graphics/ ... library of functions data files internet ? “data” objects 6 ? æ XXXXXXXz ≥≥≥≥) screen “results” objects PS JPEG . . . Active memory Hard disk 1: R. R (library) , R HOME/library (R HOME R) (packages ) baseRR R (base R HOME/library/base/R/base) R n10 > n [1] 10 1n 4
分享到:
收藏