Nagoya.R #6 LT Beanplot

1,440 views

Published on

Published in: Education, Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,440
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
5
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Nagoya.R #6 LT Beanplot

  1. 1. 2011/08/27 Nagoya.R #6 @Saturday, August 27, 2011 1
  2. 2. Saturday, August 27, 2011 2
  3. 3. • ID: sakaue • : ... ... • Nagoya.R / Hiroshima.R • Osaka.R #5, #6 • ...Saturday, August 27, 2011 3
  4. 4. Saturday, August 27, 2011 4
  5. 5. ... • •( ∀ ) !! • •Saturday, August 27, 2011 5
  6. 6. AgendaSaturday, August 27, 2011 6
  7. 7. AgendaSaturday, August 27, 2011 7
  8. 8. 1. • box-and-whisker plot [Tukey, 1977] • • •3 • ...Saturday, August 27, 2011 8
  9. 9. 1. • boxplot() • usage: boxplot(x, horizontal=TRUE) • horizontalSaturday, August 27, 2011 9
  10. 10. 1. 8 20Saturday, August 27, 2011 10
  11. 11. 1. 1.5 8 20Saturday, August 27, 2011 11
  12. 12. 1. > x <- read.csv(sample.csv) > boxplot(x[,1]) > boxplot(x[,1], horizontal=TRUE)Saturday, August 27, 2011 12
  13. 13. 1.Saturday, August 27, 2011 13
  14. 14. AgendaSaturday, August 27, 2011 14
  15. 15. AgendaSaturday, August 27, 2011 15
  16. 16. 2. beanplot ( ∀ ) !! • • • • • beanplotSaturday, August 27, 2011 16
  17. 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/1306409057Saturday, August 27, 2011 17
  18. 18. Saturday, August 27, 2011 18
  19. 19. Saturday, August 27, 2011 19
  20. 20. 2. beanplot ( ∀ ) !! ...Saturday, August 27, 2011 20
  21. 21. 2. beanplot ( ∀ ) !! beanplot ... ...Saturday, August 27, 2011 21
  22. 22. 2. beanplot ( ∀ ) !! beanplotSaturday, August 27, 2011 22
  23. 23. AgendaSaturday, August 27, 2011 23
  24. 24. AgendaSaturday, August 27, 2011 24
  25. 25. 3. tips: • windowsFonts() • (?) • ... > windowsFonts(JP1=windowsFont("MS Gothic"),JP2=windowsFont("MS Mincho"))Saturday, August 27, 2011 25
  26. 26. 3. tips: • xaxt="n" • • X •Y yaxt="n"Saturday, August 27, 2011 26
  27. 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 RomanSaturday, August 27, 2011 27
  28. 28. beanplotSaturday, August 27, 2011 28
  29. 29. Saturday, August 27, 2011 30
  30. 30. twitter: @sakaue e-mail: tsakaue<at>hiroshima-u.ac.jpSaturday, August 27, 2011 31

×