全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
6821 17
2007-04-05

07年3月开始,R的创始人Ross Ihaka 在Auckland大学统计系为3年级学生讲授Statistical Computing课程

本贴将学习Ross讲稿

课程地址:http://www.stat.auckland.ac.nz/~stat380/

该课程的软件计算包当然是R,另外还有一个代码编辑工具Tinn-R,个人觉得十分不错。

R的下载地址(要求能上外网):

http://cran.cnr.berkeley.edu/bin/windows/base/R-2.4.1-win32.exe

Tinn-R的下载地址(要求能上外网):

http://www.stat.auckland.ac.nz/~stat380/Tinn-R%201.17.2.4%20setup.exe




[此贴子已经被作者于2007-4-5 10:36:59编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2007-4-5 10:38:00
课程简介:
This course provides an introduction to statistical computing using the R statistical computing environment. The course will provide an introduction to R programming, including: 
An introduction to R 
Control flow and function writing 
Data structures and their use 
Numerical methods 
Simulation 
Object-oriented programming
Graphics programming
The content of this course differs from that of other courses in the Department of Statistics in that it does not emphasise data analysis and interpretation, but instead concentrates on programming.
We will assume that students have used R or some other similar programming environment, but will not assume that students have had extensive prior programming experience.

[此贴子已经被作者于2007-4-5 20:02:44编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2007-4-5 10:42:00

Tinn-R的主界面为:

105635.bmp


[此贴子已经被作者于2007-4-5 10:45:08编辑过]

附件列表
105634.bmp

原图尺寸 2.85 MB

105634.bmp

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2007-4-5 10:55:00

注意为了使用方便可以对Tinn-R进行适当配置

我个人进行了两点个性化配置:

1、高亮配置。

选择option->main->application

在Active line highlighted前打勾,如图:

105636.jpg

2、热键设置。

选择R->hotkey of R,进行如下图的设置

发送代码行:我用alt+L

发送选中代码:我用alt+P

105637.jpg


[此贴子已经被作者于2007-4-5 10:58:45编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2007-4-5 11:01:00

Ross的讲义可以到如下地址下载

http://www.stat.auckland.ac.nz/~stat380/lectures.html

共15部分,如果大家不能上外网,我会上传,下面正是开始

基本结构为:执行讲义中的程序代码,给出输出结果

同时我将上传代码Tinn-R文件,方便大家学习

[此贴子已经被作者于2007-4-5 11:59:52编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2007-4-5 11:04:00

01 Introduction

105639.rar
大小:(700 Bytes)

 马上下载

本附件包括:

  • 01 introduciton.r

> ############# 01 Introduction#################
> ### Simple R Expression
> 1+2
[1] 3
> 1/2
[1] 0.5
> 17^2
[1] 289
> 1+2*3
[1] 7
> (1+2)*3
[1] 9
> ### R functions
> sqrt(2)
[1] 1.414214
> log(10)
[1] 2.302585
> log10(10)
[1] 1
> sin(1)
[1] 0.841471
> 4*atan(1)
[1] 3.141593
> ### Assignment
> z=17
> z*(z+23)
[1] 680
> z=18
> z*(z+23)
[1] 738
> ### Numeric Vectors
> x=c(1,2,3,4)
> x
[1] 1 2 3 4
> ### Sequences
> 1:50
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
[23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
[45] 45 46 47 48 49 50
> 5:-5
[1] 5 4 3 2 1 0 -1 -2 -3 -4 -5
> ### Combining vectors
> x=c(1,2,3,4)
> c(x,10)
[1] 1 2 3 4 10
> c(x,x)
[1] 1 2 3 4 1 2 3 4
> ### Vector Arithmetic
> x
[1] 1 2 3 4
> 2*x+1
[1] 3 5 7 9
> sqrt(x)
[1] 1.000000 1.414214 1.732051 2.000000
> ### The Recycling Rule
> c(1,2,3,4)+c(1,2)
[1] 2 4 4 6
> ### The Modulo and Integer Division Operators
> 11%%3
[1] 2
> 1:10%%2
[1] 1 0 1 0 1 0 1 0 1 0
> 13.5%%2
[1] 1.5
> 13.5%/%2
[1] 6
> ### Elements and Subsets
> x[3]
[1] 3
> x[c(1,3)]
[1] 1 3
> x[1:3]
[1] 1 2 3
> ### Negative Subscripts
> x[c(-1,-3)]
[1] 2 4
> ### Changing Vector Subsets
> y=1:10
> y[4:6]=0
> y
[1] 1 2 3 0 0 0 7 8 9 10
> ### Special Numerical Values - Infinity
> 1/0
[1] Inf
> -1/0
[1] -Inf
> 1+Inf
[1] Inf
> 1000/Inf
[1] 0
> ### Special Numerical Values - Not a Number
> 0/0
[1] NaN
> Inf-Inf
[1] NaN
> sqrt(-1)
[1] NaN
Warning message:
NaNs produced in: sqrt(-1)
> ### Special Numerical Values - Not a Available
> 1+sin(NA)
[1] NA
> ### Summary Functions - min, max and rang
> max(1:100)
[1] 100
> max(1:100,Inf)
[1] Inf
> range(1:100)
[1] 1 100
> ### Summary Functions - sum and prod
> sum(1:100)
[1] 5050
> prod(1:10)
[1] 3628800
> ### Summary Functions and NA
> min(NA, 100)
[1] NA
> min(10,20,NA,na.rm=T)
[1] 10
> ### Cumulative Summaries
> cumsum(1:10)
[1] 1 3 6 10 15 21 28 36 45 55
> cumprod(1:10)
[1] 1 2 6 24 120 720 5040 40320
[9] 362880 3628800
> cummax(1:10)
[1] 1 2 3 4 5 6 7 8 9 10
> cummin(1:10)
[1] 1 1 1 1 1 1 1 1 1 1
> ### Parallel Summary Functions
> pmin(c(1,10), c(10,2))
[1] 1 2
> pmax(0,c(-1,0,1))
[1] 0 0 1


[此贴子已经被作者于2007-4-5 11:07:50编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群