More Related Content
More from SAKAUE, Tatsuya
More from SAKAUE, Tatsuya (20)
Nagoya R #6 Boxplot and Beanplot Guide
- 3. • ID: sakaue
• : ... ...
• Nagoya.R / Hiroshima.R
• Osaka.R #5, #6
• ...
Saturday, August 27, 2011 3
- 5. ...
•
•( ∀ ) !!
•
•
Saturday, August 27, 2011 5
- 8. 1.
• box-and-whisker plot [Tukey, 1977]
•
•
•3
• ...
Saturday, August 27, 2011 8
- 9. 1.
• boxplot()
• usage: boxplot(x, horizontal=TRUE)
• horizontal
Saturday, August 27, 2011 9
- 10. 1.
8 20
Saturday, August 27, 2011 10
- 11. 1.
1.5
8 20
Saturday, August 27, 2011 11
- 12. 1.
> x <- read.csv(sample.csv)
> boxplot(x[,1])
> boxplot(x[,1], horizontal=TRUE)
Saturday, August 27, 2011 12
- 16. 2. beanplot ( ∀ ) !!
•
•
•
•
• beanplot
Saturday, August 27, 2011 16
- 17. 2. beanplot ( ∀ ) !!
> library(beanplot)
> g <- rnorm(200,mean=0,sd=1)
> bm <- c(rnorm(100,mean=-1,sd=0.5),rnorm
(100,mean=1,sd=0.5))
> uni <- runif(200,min=-2,max=2)
> d = data.frame(uni=uni,bm=bm,gaus=g)
> par(mfrow = c(1,2))
> boxplot(d, col = "lightblue")
> beanplot(d, col = "lightpink")
drkcore Beanplot Boxplot
http://blog.kzfmix.com/entry/1306409057
Saturday, August 27, 2011 17
- 20. 2. beanplot ( ∀ ) !!
...
Saturday, August 27, 2011 20
- 21. 2. beanplot ( ∀ ) !!
beanplot ... ...
Saturday, August 27, 2011 21
- 22. 2. beanplot ( ∀ ) !!
beanplot
Saturday, August 27, 2011 22
- 25. 3. tips:
• windowsFonts()
• (?)
• ...
> windowsFonts(JP1=windowsFont("MS
Gothic"),JP2=windowsFont("MS Mincho"))
Saturday, August 27, 2011 25
- 26. 3. tips:
• xaxt="n"
•
•
X
•Y yaxt="n"
Saturday, August 27, 2011 26
- 27. 3. tips:
> x <- read.csv("hoge.csv")
# CSV
> par(family="JP2", ps=16)
# MS Mincho ps
> boxplot(x, horizontal=TRUE, xaxt="n")
# X
> axis(1, family="serif", ps=12)
#X serif Time New Roman
Saturday, August 27, 2011 27
- 30. twitter: @sakaue
e-mail: tsakaue<at>hiroshima-u.ac.jp
Saturday, August 27, 2011 31