R: a nearly-Lisp
Christophe Rhodes
Teclo Networks AG
April 6, 2011
1 / 29
R: a nearly-Lisp Christophe Rhodes Teclo Networks AG April 6, 2011 - - PowerPoint PPT Presentation
R: a nearly-Lisp Christophe Rhodes Teclo Networks AG April 6, 2011 1 / 29 Outline Introduction Examples Repeated Measurement Trellis Graphics R and Lisp 2 / 29 Outline Introduction Examples Repeated Measurement Trellis Graphics R
1 / 29
2 / 29
3 / 29
4 / 29
4 / 29
4 / 29
4 / 29
5 / 29
5 / 29
6 / 29
7 / 29
7 / 29
7 / 29
7 / 29
◮ seq(1,10) ◮ seq(from=1, 10) ◮ seq(to=10, from=1) ◮ seq(1, 10, by=1)
8 / 29
◮ character ◮ numeric ◮ double ◮ integer ◮ complex ◮ logical
9 / 29
◮ <<- to override
10 / 29
11 / 29
12 / 29
13 / 29
13 / 29
◮ could be ‘random noise’ in our equipment; ◮ could be other systematic effects;
14 / 29
15 / 29
15 / 29
16 / 29
16 / 29
16 / 29
16 / 29
17 / 29
18 / 29
18 / 29
19 / 29
20 / 29
yield
Svansota
Manchuria
Velvet Peatland Glabron
Wisconsin No. 38 Trebi 20 30 40 50 60
20 30 40 50 60
Svansota
Manchuria
Velvet Peatland Glabron
Wisconsin No. 38 Trebi
20 30 40 50 60
1932 1931
21 / 29
Yearly Sunspots
sunspot.year
1700 1750 1800 1850 1900 1950 2000 50 100 150
Year sunspot.year
1700 1750 1800 1850 1900 1950 2000 100
21 / 29
22 / 29
hour log10(counts)
2.5 3.0 3.5 4.0
Monday Jan
5 10 15 20
Tuesday Jan Wednesday Jan
5 10 15 20
Thursday Jan Friday Jan
5 10 15 20
Saturday Jan Sunday Jan Monday Feb Tuesday Feb Wednesday Feb Thursday Feb Friday Feb Saturday Feb
2.5 3.0 3.5 4.0
Sunday Feb
2.5 3.0 3.5 4.0
Monday Mar Tuesday Mar Wednesday Mar Thursday Mar Friday Mar Saturday Mar Sunday Mar Monday Apr Tuesday Apr Wednesday Apr Thursday Apr Friday Apr Saturday Apr
2.5 3.0 3.5 4.0
Sunday Apr
2.5 3.0 3.5 4.0 5 10 15 20
Monday May Tuesday May
5 10 15 20
Wednesday May Thursday May
5 10 15 20
Friday May Saturday May
5 10 15 20
Sunday May
22 / 29
24 / 29
25 / 29
◮ apply to character vector or file; ◮ returns a list of expressions, optionally decorated with source
◮ takes (list of) expressions as argument; ◮ returns value of last expression; ◮ optional (lexical) environment argument, defaults to local
◮ string representation of object ◮ approximately inverse of parse 26 / 29
27 / 29
◮ ‘foo<-‘(x, value=3) 27 / 29
◮ ‘foo<-‘(x, value=3)
◮ signalCondition ◮ simpleError, simpleWarning, simpleMessage ◮ withRestarts, findRestart, invokeRestart 27 / 29
28 / 29
28 / 29
28 / 29
29 / 29
29 / 29
29 / 29
29 / 29