SlideShare uma empresa Scribd logo
1 de 177
Baixar para ler offline
Japan.R #2 @
                                    2011-11-26

Saturday, November 26, 11                        2
0.

Saturday, November 26, 11    3
(SAKAUE, Tatsuya)

                    •           :              ...
                    •       Nagoya.R / HiRoshima.R
                    •       ID: sakaue
                    •               ...



Saturday, November 26, 11                                     5
Saturday, November 26, 11   6
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   8
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   9
•
         •                       Ross Ihaka & Robert Gentleman (R & R)
                     •      Ross Ihaka and Robert Gentleman. R: A language for data analysis and graphics.
                            Journal of Computational and Graphical Statistics, 5(3):299-314, 1996.

                     •      http://biostat.mc.vanderbilt.edu/twiki/pub/Main/Je reyHorner/JCGSR.pdf


         •

Saturday, November 26, 11                                                                                    10
Saturday, November 26, 11   11
•                  IBM SPSS Statistics   10   ...


         •
         •
Saturday, November 26, 11                                    12
•
                            •
                            •
               •
                            •

Saturday, November 26, 11       13
Ugeeeeeeeee




Saturday, November 26, 11                 14
Excel     SPSS   ...
        •
        •
                            • Excel
        •
Saturday, November 26, 11                          15
Excel
                            SPSS
Saturday, November 26, 11           16
-Install / Update / Uninstall-



Saturday, November 26, 11               17
1. http://www.r-project.org/
           2. “download R”
           3. JAPAN
           4.                OS


Saturday, November 26, 11                 18
• Windows: : http://cran.md.tsukuba.ac.jp/bin/windows/base/
                     • Download R 2.14.0 for Windows

            • Mac OS X: http://cran.md.tsukuba.ac.jp/bin/macosx/
                     • R-2.14.0.pkg (latest version)



Saturday, November 26, 11                                                 19
Saturday, November 26, 11   20
Saturday, November 26, 11   21
Saturday, November 26, 11   22
Saturday, November 26, 11   23
Saturday, November 26, 11   24
Saturday, November 26, 11   25
1. http://www.r-project.org/
                  2.

                  3.


Saturday, November 26, 11                        26
•

                            •

            •                   Windows
                            •


Saturday, November 26, 11                 27
• Windows
          • [ Windows XP]        →

          • [ Windows 7 ]       →


    • Mac OS X
          • /Applications                    /Library
                 Frameworks   R. framework       CleanApp


Saturday, November 26, 11                                   28
• Windows
            • START → Program → R → R 2.14.0
      • Mac OS X
            • /Applications     R


                            R

Saturday, November 26, 11                      29
• Windows         Mac OS X
                1. q()
                2.
                3.              R


Saturday, November 26, 11              30
•                   OK

            •                              Win
                  • [ ]→[GUI           ]
                  • Font [MS Mincho]

Saturday, November 26, 11                        31
...
                •        help(sth)
                • seekR     (http://seekr.jp/)


                • R SEEK     (http://www.rseek.org/)


                • RjpWiki       (http://www.okada.jp.org/RWiki/)


                • R-Tips    (http://cse.naro.a rc.go.jp/takezawa/r-tips/r.html)


                •R                                 (http://aoki2.si.gunma-u.ac.jp/R/)




Saturday, November 26, 11                                                               32
•
            •
            •               help(sth) !!


Saturday, November 26, 11                  33
Excel
                            SPSS
Saturday, November 26, 11           34
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   35
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   36
Saturday, November 26, 11   37
•                        [Enter]
                            • > 3+5 [Enter]
                            • > 10-3 [Enter]
                            • > 2*3 [Enter]
                            • > 100/20 [Enter]
                            • > (12 + 34 -56) * 78 / 90 [Enter]
Saturday, November 26, 11                                         38
•
                            •   > 100^1/2
                            •   > 100^(1/2)
Saturday, November 26, 11                     39
Saturday, November 26, 11   40
Saturday, November 26, 11   41
Saturday, November 26, 11   42
“I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/
Saturday, November 26, 11                                                                             43
Saturday, November 26, 11   44
sqrt()
                    • > sqrt(2)
                    • > sqrt(144)
                    • > sqrt(104976)
                    •[       ]2

                            • 2 3         1
                            • > 2^(1/3)
Saturday, November 26, 11                     45
(   )

       •
       •q()                 help(sth)

       •
Saturday, November 26, 11                46
Saturday, November 26, 11   47
Saturday, November 26, 11   48
Saturday, November 26, 11   49
Saturday, November 26, 11   50
Saturday, November 26, 11   51
“I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/
Saturday, November 26, 11                                                                             52
Saturday, November 26, 11   53
“hako”

     •        > hako <- c(1,2,3,4,5)
     •        > hako
                • c()       concatenate/combine
                •
Saturday, November 26, 11                         54
c()     “<-”

       hako <- c(1,2,3,4,5)        “<-”

                                   ←

Saturday, November 26, 11                 55
+        ...


                    •                  [Enter]


                            • [STOP]
                            • [Esc]

Saturday, November 26, 11                              56
•
                    •       Tab


Saturday, November 26, 11         57
hako


               1            5          5



Saturday, November 26, 11                  58
Saturday, November 26, 11   59
•       > sqrt(hako)

                    • > log(hako)

Saturday, November 26, 11                  60
sqrt(1), sqrt(2) ... sqrt(5)
                             log(1), log (2) ... log (5)

Saturday, November 26, 11                                  61
Saturday, November 26, 11   62
Saturday, November 26, 11   63
•                       summary()

              •                     table()

              •             sum()

              •                         length()

Saturday, November 26, 11                          64
•                  mean()

         •                           max(), min()

         •                  median()

         •                   sd()


Saturday, November 26, 11                           65
•R
              •
                • q(), help(), sqrt(), log(), c()
              •
Saturday, November 26, 11                           66
OK

Saturday, November 26, 11        67
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   68
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   69
Sub topics

                            1.
                            2.
                            3.

Saturday, November 26, 11                     70
Saturday, November 26, 11   71
Saturday, November 26, 11   72
...

           •
           •
           •                TOEIC

Saturday, November 26, 11           73
...

                            A   180     75
                            B   170     65
                            C   165     60
                            D   175     70
                            E   190     80
Saturday, November 26, 11                    74
R


Saturday, November 26, 11   75
Saturday, November 26, 11   76
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               77
Saturday, November 26, 11   78
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               79
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               80
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               81
Saturday, November 26, 11   82
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               83
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               84
1   2   3
                            4   5   6
                            7   8   9


Saturday, November 26, 11               85
Saturday, November 26, 11   86
matrix()

Saturday, November 26, 11   87
matrix()

           •
           • matrix(            ,      ,   )

           •
Saturday, November 26, 11                      88
A   180   75
                            B   170   65
                            C   165   60
                            D   175   70
                            E   190   80
Saturday, November 26, 11                  89
karada <- matrix(c(180, 170, 165,
          175, 190, 75, 65, 60, 70, 80), 5, 2)
            1. c()
            2. matrix()
                            • 5   2
            3. karada

Saturday, November 26, 11                        90
> karada




Saturday, November 26, 11              91
matrix(1:9,nrow=3,ncol=3)


                            1   4      7
                            2   5      8
                            3   6      9

Saturday, November 26, 11                       92
matrix(1:9,nrow=3,ncol=3,byrow=TRUE)


                            1   2   3
                            4   5   6
                            7   8   9

Saturday, November 26, 11                 93
1.

                  2.




Saturday, November 26, 11   94
demo <- matrix(1:30,nrow=5,ncol=6)




       http://gyazo.com/76c58d5d6c8426a44f160897cda99671.png

Saturday, November 26, 11                                      95
2            → demo[2,]
                            2            → demo[,2]




              http://gyazo.com/6726084afd9e1cc4b03df85fe6bc0f29.png
Saturday, November 26, 11                                             96
2       4
                                → demo[c(2,4),]
                            2       4
                                → demo[, c(2,4)]

Saturday, November 26, 11                          97
http://gyazo.com/a116c0e2f1284ea7d38bf7024d92f1cc.png
Saturday, November 26, 11                                            98
•
             •
             •

Saturday, November 26, 11   99
Sub topics

                            1.
                            2.
                            3.

Saturday, November 26, 11                     100
•
                  •
                  •

Saturday, November 26, 11   101
B   175   65
                            B   177   70
                            B   174   75
                            A   179   70
                            O   170   60
Saturday, November 26, 11                  102
• Excel   WS

                    •
                    •

Saturday, November 26, 11          103
...

             • data.frame()   (p.240)

             •                (p.243)

             •                     (p.243)



Saturday, November 26, 11                    104
...

Saturday, November 26, 11         105
“173.365 - Come on, feel the noise” by Je the Trojan
                               http://www. ickr.com/photos/trojanguy/3046207115/
Saturday, November 26, 11                                                     106
Saturday, November 26, 11   107
Sub topics

                            1.
                            2.
                            3.

Saturday, November 26, 11                     108
Saturday, November 26, 11   109
...

               • Excel
               •
                     →


Saturday, November 26, 11         110
•                 ...

                            •
                            •
Saturday, November 26, 11             111
• Windows            →
                 •       “MyDocuments”

              • Mac OS X           →

              • Linux up to you...

Saturday, November 26, 11                112
•
                            • getwd()
                               • > getwd()
                            • setwd()
                               •   > setwd("/Users/sakaue/Desktop/")




Saturday, November 26, 11                                              113
• read.csv()
               • CSV
               • CSV: Comma Separated Value

Saturday, November 26, 11                     114
1. demo.csv
                       • XLS/XLSX
                       • CSV               UTF-8

           2. > test <- read.csv(“demo.csv”)

           3. > test [Enter]


Saturday, November 26, 11                          115
CSV
                                  ...



Saturday, November 26, 11               116
• read.delim()
               •
               • delim: delimiter

Saturday, November 26, 11           117
1. demo.xls
        2. > test2 <- read.delim("clipboard")
                            Mac   : read.delim(pipe(“pbpaste”))

        3. > test2 [Enter]



Saturday, November 26, 11                                         118
> table(test2[,1])
                            •          1

                  > mean(test2[,2])
                            •          2

                  > hist(test2[,2])
                            •          2


Saturday, November 26, 11                  119
•
         • CSV                   read.csv()

         •                  or



Saturday, November 26, 11                     120
CSV


                            Excel


                                    “y2.d175 | Lasershow! Relax!” by B Rosen
                                    http://www.flickr.com/photos/rosengrant/4751386872/
Saturday, November 26, 11                                                          121
Excel
                            SPSS
Saturday, November 26, 11           122
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   123
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   124
Saturday, November 26, 11   125
Saturday, November 26, 11   126
1.
                   2.



Saturday, November 26, 11   127
2

                            Excel       SPSS
                                        ... orz
Saturday, November 26, 11                         128
Saturday, November 26, 11   129
> age <- c(18, 23, 14, 19,
                   21, 29, 22, 21, 23, 19, 20, 20,
                   26, 18, 14, 6, 8, 16, 23, 20)
                   > hist(age)

Saturday, November 26, 11                            130
Saturday, November 26, 11   131
> score <- c(60, 50, 72, 43, 50,
                55, 43, 50, 85, 40)
                > words <- c(340, 190, 465, 170,
                130, 225,140, 310, 580, 120)
                > plot(score,words)

Saturday, November 26, 11                          132
Saturday, November 26, 11   133
> high <- c(350, 285, 315, 340,
            210, 185, 120, 740, 425, 155)
            > coll <- c(365, 570, 645, 540, 645,
            665, 880, 550, 410, 585)
            > boxplot(high, coll, names=c("High", "Coll"))


Saturday, November 26, 11                                    134
1.

                   2.

                   3.

                            twitter, FB

Saturday, November 26, 11                 135
Excel

                            “y2.d175 | Lasershow! Relax!” by B Rosen
                            http://www.flickr.com/photos/rosengrant/4751386872/
Saturday, November 26, 11                                                  136
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   137
Agenda
                            1. R
                            2.
                            3.
                            4.
                            5. R

Saturday, November 26, 11                   138
Saturday, November 26, 11   139
t




Saturday, November 26, 11       140
t




Saturday, November 26, 11       141
t, χ2, F




Saturday, November 26, 11              142
t



                            t.test()




Saturday, November 26, 11              143
t


     > like <- c(6,10,6,10,7,8,7,9,10,4)
     > dislike <- c(3,5,6,4,4,8,4,5,4,7)
     > t.test(like,dislike,var.equal=TRUE)




Saturday, November 26, 11                    144
t
     > t.test(like,dislike,var.equal=TRUE)

             Two Sample t-test

     data: like and dislike
     t = 3.3041, df = 18, p-value = 0.003946
     alternative hypothesis: true difference in
     means is not equal to 0 #
     95 percent confidence interval: #
      0.9831754 4.4168246
     sample estimates:
     mean of x mean of y
           7.7       5.0

Saturday, November 26, 11                         145
t              ...
        “
         t                      Welch            t


                 Welch              t                  ”

  http://aoki2.si.gunma-u.ac.jp/lecture/Average/bunsan1.html


Saturday, November 26, 11                                  146
Welch !




Saturday, November 26, 11             147
!                     !
              ―                                                           Welch                    ―


          •      http://oku.edu.mie-u.ac.jp/~okumura/blog/node/2262

          •      http://aoki2.si.gunma-u.ac.jp/lecture/BF/index.html

          •      Donald W. Zimmerman, ``Some properties of preliminary tests of equality of variances in
                 the two-sample location problem'', The Journal of General Psychology,Vol.123, pp.217-231
                 (1996)

          •      The unequal variance t-test is an underused alternative to Student's t-test and the Mann-
                 Whitney U test -- Ruxton 17 (4): 688 -- Behavioral Ecology

          •                       :          Mann-Whitney U                         http://qdai.way-
                 nifty.com/qjes/2005/02/mannwhitneyu.html




Saturday, November 26, 11                                                                                    148
...
     > t.test(like,dislike,var.equal=FALSE)

             Welch Two Sample t-test

     data: like and dislike
     t = 3.3041, df = 16.795, p-value = 0.004249
     alternative hypothesis: true difference in
     means is not equal to 0
     95 percent confidence interval:
      0.9743014 4.4256986
     sample estimates:
     mean of x mean of y
           7.7       5.0

Saturday, November 26, 11                          149
t                         t                                           ...

     •t                         t                            ...

     •                                                                       Student                    t
                                                                         t

     •                                                                                                    s^2
                                                         s                   t                                     ...
     •       %E3%82%B4%E3%82%BB%E3%83%83%E3%83%88
                                                 http://ja.wikipedia.org/wiki/%E3%82%A6%E3%82%A3%E3%83%AA%E3%82%A2%E3%83%A0%E3%83%BB



     •                       http://ja.wikipedia.org/wiki/%E8%87%AA%E7%94%B1%E5%BA%A6

     •       http://mat.isc.chubu.ac.jp/fpr/fpr1997/0119.html
     •       http://www.pol.geophys.tohoku.ac.jp/~hanawa/ori/ori/054.html


Saturday, November 26, 11                                                                                                              150
t




Saturday, November 26, 11       151
Saturday, November 26, 11   152
•
                •

                •           A   B

          •

Saturday, November 26, 11           153
:         “        ”
                                                              “however”




                                    109       347        8   493

                                [    ]         , ....
                                [    ] ...,         , ....
                                [    ] ...,         .

Saturday, November 26, 11                                                 154
> freq <- c(109,347,8)
    > chisq.test(freq,correct=FALSE)

            Chi-squared test for given probabilities

        data:               freq
        X-squared = 391.7371, df = 2, p-value < 2.2e-16


    #                                              2
    #     http://homepage2.nifty.com/nandemoarchive/toukei_kiso/t_F_chi.htm




Saturday, November 26, 11                                                     155
t




Saturday, November 26, 11       156
Saturday, November 26, 11   157
•3
                 •t


           • ANOVA          ANalysis Of VAriance

           •F                     F


Saturday, November 26, 11                          158
A        B       C
                                10       9       6
                                 8       7       4
                                 9       4       3
                                 6       5       9
                                 9       2       2
                                 5       8       6
                                 7       4       2
                                 9       2       4
                                 8       8       3
                                10       4       9
Saturday, November 26, 11                            159
> test <- read.csv("demo.csv", head=T)
   > anova(lm(Class ~ Score, data=test))
   Analysis of Variance Table

   Response: Class
             Df Sum Sq Mean Sq F value Pr(>F)
   Score      1 5.2389 5.2389 9.9376 0.00384
   **
   Residuals 28 14.7611 0.5272
   ---
   Signif. codes:           0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1




Saturday, November 26, 11                                                    160
Saturday, November 26, 11   161
Saturday, November 26, 11   162
One more thing...


Saturday, November 26, 11                 163
Hi                       oshima.


Saturday, November 26, 11             164
HiRoshima.R

     •                                      R
                 • 2-3
     •
                 •                        ...


Saturday, November 26, 11                       165
HiRoshima.R
     •                               ...

     •                      R
           • Tsukuba.R / Tokyo.R / Osaka.R / Nagoya.R
           • Internet (computer) literacy
           •                  ...


Saturday, November 26, 11                               166
HiRoshima.R

         •R
           • HiRoshima.R
           •                       !!




Saturday, November 26, 11                 168
1            22



                            14%
                                   23%




                            64%

Saturday, November 26, 11                169
HiRoshima.R

     •                       →Lightning Talks
          •
          •

Saturday, November 26, 11                       171
HiRoshima.R
             •
                        •   R   R
                        •
             •
                        •
                        •
Saturday, November 26, 11           172
HiRoshima.R
           •                +   Speaker   !!
                      •
                      •
                      •
                      •R
                      •R
Saturday, November 26, 11                      173
HiRoshima.R

                  •
                            •   1
                            •   2   #1
                            •   3   Lightning Talks
                                •
Saturday, November 26, 11                             174
•Speaker
                       •
                       • Lightning Talks
                          •        R            OK
                          •       5        OK

Saturday, November 26, 11                            176
•Feedback
                            • blog / twitter
                                • #HiRoshimaR   @sakaue
                            •

Saturday, November 26, 11                                 177
Saturday, November 26, 11   178
Saturday, November 26, 11   179
Saturday, November 26, 11   180
2,940       1,785   3,780

Saturday, November 26, 11                   181
Excel
                            SPSS
Saturday, November 26, 11           182
twitter: @sakaue

                            e-mail: tsakaue<AT>hiroshima-u.ac.jp




Saturday, November 26, 11                                          183

Mais conteúdo relacionado

Mais de SAKAUE, Tatsuya

MethokenOkinawa_Sakaue_LearnerCorpus
MethokenOkinawa_Sakaue_LearnerCorpusMethokenOkinawa_Sakaue_LearnerCorpus
MethokenOkinawa_Sakaue_LearnerCorpusSAKAUE, Tatsuya
 
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」SAKAUE, Tatsuya
 
統計解析環境Rによる統計処理の基本―検定と視覚化―
統計解析環境Rによる統計処理の基本―検定と視覚化―統計解析環境Rによる統計処理の基本―検定と視覚化―
統計解析環境Rによる統計処理の基本―検定と視覚化―SAKAUE, Tatsuya
 
統計解析環境Rによる言語データの分析
統計解析環境Rによる言語データの分析統計解析環境Rによる言語データの分析
統計解析環境Rによる言語データの分析SAKAUE, Tatsuya
 
ポッドキャスト利用による個別学習の支援とリスニング不安への影響
ポッドキャスト利用による個別学習の支援とリスニング不安への影響ポッドキャスト利用による個別学習の支援とリスニング不安への影響
ポッドキャスト利用による個別学習の支援とリスニング不安への影響SAKAUE, Tatsuya
 
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」SAKAUE, Tatsuya
 
ベクタ画像と PNG 画像の比較
ベクタ画像と PNG 画像の比較ベクタ画像と PNG 画像の比較
ベクタ画像と PNG 画像の比較SAKAUE, Tatsuya
 
反応時間データをどう分析し図示するか
反応時間データをどう分析し図示するか反応時間データをどう分析し図示するか
反応時間データをどう分析し図示するかSAKAUE, Tatsuya
 
LET2012 ワークショップ「R による教育・言語データ処理のススメ」
LET2012 ワークショップ「R による教育・言語データ処理のススメ」LET2012 ワークショップ「R による教育・言語データ処理のススメ」
LET2012 ワークショップ「R による教育・言語データ処理のススメ」SAKAUE, Tatsuya
 
授業外で個別学習を促進するためのポッドキャスト利用
授業外で個別学習を促進するためのポッドキャスト利用授業外で個別学習を促進するためのポッドキャスト利用
授業外で個別学習を促進するためのポッドキャスト利用SAKAUE, Tatsuya
 
R のインストール手順(LET 2012用)
R のインストール手順(LET 2012用)R のインストール手順(LET 2012用)
R のインストール手順(LET 2012用)SAKAUE, Tatsuya
 
Nagoya.R #8 入門者講習資料
Nagoya.R #8 入門者講習資料Nagoya.R #8 入門者講習資料
Nagoya.R #8 入門者講習資料SAKAUE, Tatsuya
 
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...SAKAUE, Tatsuya
 
Osaka.R #7 LT: フォントのオハナシ
Osaka.R #7 LT: フォントのオハナシOsaka.R #7 LT: フォントのオハナシ
Osaka.R #7 LT: フォントのオハナシSAKAUE, Tatsuya
 
HiRoshima.R #2 LT by @sakaue
HiRoshima.R #2 LT by @sakaueHiRoshima.R #2 LT by @sakaue
HiRoshima.R #2 LT by @sakaueSAKAUE, Tatsuya
 
HiRoshima.R #2 入門者講習資料
HiRoshima.R #2 入門者講習資料HiRoshima.R #2 入門者講習資料
HiRoshima.R #2 入門者講習資料SAKAUE, Tatsuya
 

Mais de SAKAUE, Tatsuya (20)

HiroshimaR4_LT_sakaue
HiroshimaR4_LT_sakaueHiroshimaR4_LT_sakaue
HiroshimaR4_LT_sakaue
 
Hiroshimar4_Rintro
Hiroshimar4_RintroHiroshimar4_Rintro
Hiroshimar4_Rintro
 
Hiroshimar3_rmecab
Hiroshimar3_rmecabHiroshimar3_rmecab
Hiroshimar3_rmecab
 
HiRoshimaR3_IntroR
HiRoshimaR3_IntroRHiRoshimaR3_IntroR
HiRoshimaR3_IntroR
 
MethokenOkinawa_Sakaue_LearnerCorpus
MethokenOkinawa_Sakaue_LearnerCorpusMethokenOkinawa_Sakaue_LearnerCorpus
MethokenOkinawa_Sakaue_LearnerCorpus
 
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」
外国語教育メディア学会第54回全国研究大会ワークショップ「Rによる外国語教育データの分析と可視化の基本」
 
統計解析環境Rによる統計処理の基本―検定と視覚化―
統計解析環境Rによる統計処理の基本―検定と視覚化―統計解析環境Rによる統計処理の基本―検定と視覚化―
統計解析環境Rによる統計処理の基本―検定と視覚化―
 
統計解析環境Rによる言語データの分析
統計解析環境Rによる言語データの分析統計解析環境Rによる言語データの分析
統計解析環境Rによる言語データの分析
 
ポッドキャスト利用による個別学習の支援とリスニング不安への影響
ポッドキャスト利用による個別学習の支援とリスニング不安への影響ポッドキャスト利用による個別学習の支援とリスニング不安への影響
ポッドキャスト利用による個別学習の支援とリスニング不安への影響
 
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」
Nagoya.R #10 LT 「グラフはベクタ(ベクトル)画像で出力しようじゃありませんか」
 
ベクタ画像と PNG 画像の比較
ベクタ画像と PNG 画像の比較ベクタ画像と PNG 画像の比較
ベクタ画像と PNG 画像の比較
 
反応時間データをどう分析し図示するか
反応時間データをどう分析し図示するか反応時間データをどう分析し図示するか
反応時間データをどう分析し図示するか
 
LET2012 ワークショップ「R による教育・言語データ処理のススメ」
LET2012 ワークショップ「R による教育・言語データ処理のススメ」LET2012 ワークショップ「R による教育・言語データ処理のススメ」
LET2012 ワークショップ「R による教育・言語データ処理のススメ」
 
授業外で個別学習を促進するためのポッドキャスト利用
授業外で個別学習を促進するためのポッドキャスト利用授業外で個別学習を促進するためのポッドキャスト利用
授業外で個別学習を促進するためのポッドキャスト利用
 
R のインストール手順(LET 2012用)
R のインストール手順(LET 2012用)R のインストール手順(LET 2012用)
R のインストール手順(LET 2012用)
 
Nagoya.R #8 入門者講習資料
Nagoya.R #8 入門者講習資料Nagoya.R #8 入門者講習資料
Nagoya.R #8 入門者講習資料
 
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...
「R による英語コーパスの処理入門―接続詞 and/but の使用実態調査を例に―」Computing Language and Culture with...
 
Osaka.R #7 LT: フォントのオハナシ
Osaka.R #7 LT: フォントのオハナシOsaka.R #7 LT: フォントのオハナシ
Osaka.R #7 LT: フォントのオハナシ
 
HiRoshima.R #2 LT by @sakaue
HiRoshima.R #2 LT by @sakaueHiRoshima.R #2 LT by @sakaue
HiRoshima.R #2 LT by @sakaue
 
HiRoshima.R #2 入門者講習資料
HiRoshima.R #2 入門者講習資料HiRoshima.R #2 入門者講習資料
HiRoshima.R #2 入門者講習資料
 

Último

Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 

Último (20)

Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

Japan.R #2 Introduction to R

  • 1. Japan.R #2 @ 2011-11-26 Saturday, November 26, 11 2
  • 3. (SAKAUE, Tatsuya) • : ... • Nagoya.R / HiRoshima.R • ID: sakaue • ... Saturday, November 26, 11 5
  • 5. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 8
  • 6. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 9
  • 7. • Ross Ihaka & Robert Gentleman (R & R) • Ross Ihaka and Robert Gentleman. R: A language for data analysis and graphics. Journal of Computational and Graphical Statistics, 5(3):299-314, 1996. • http://biostat.mc.vanderbilt.edu/twiki/pub/Main/Je reyHorner/JCGSR.pdf • Saturday, November 26, 11 10
  • 9. IBM SPSS Statistics 10 ... • • Saturday, November 26, 11 12
  • 10. • • • • Saturday, November 26, 11 13
  • 12. Excel SPSS ... • • • Excel • Saturday, November 26, 11 15
  • 13. Excel SPSS Saturday, November 26, 11 16
  • 14. -Install / Update / Uninstall- Saturday, November 26, 11 17
  • 15. 1. http://www.r-project.org/ 2. “download R” 3. JAPAN 4. OS Saturday, November 26, 11 18
  • 16. • Windows: : http://cran.md.tsukuba.ac.jp/bin/windows/base/ • Download R 2.14.0 for Windows • Mac OS X: http://cran.md.tsukuba.ac.jp/bin/macosx/ • R-2.14.0.pkg (latest version) Saturday, November 26, 11 19
  • 23. 1. http://www.r-project.org/ 2. 3. Saturday, November 26, 11 26
  • 24. • • Windows • Saturday, November 26, 11 27
  • 25. • Windows • [ Windows XP] → • [ Windows 7 ] → • Mac OS X • /Applications /Library Frameworks R. framework CleanApp Saturday, November 26, 11 28
  • 26. • Windows • START → Program → R → R 2.14.0 • Mac OS X • /Applications R R Saturday, November 26, 11 29
  • 27. • Windows Mac OS X 1. q() 2. 3. R Saturday, November 26, 11 30
  • 28. OK • Win • [ ]→[GUI ] • Font [MS Mincho] Saturday, November 26, 11 31
  • 29. ... • help(sth) • seekR (http://seekr.jp/) • R SEEK (http://www.rseek.org/) • RjpWiki (http://www.okada.jp.org/RWiki/) • R-Tips (http://cse.naro.a rc.go.jp/takezawa/r-tips/r.html) •R (http://aoki2.si.gunma-u.ac.jp/R/) Saturday, November 26, 11 32
  • 30. • • help(sth) !! Saturday, November 26, 11 33
  • 31. Excel SPSS Saturday, November 26, 11 34
  • 32. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 35
  • 33. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 36
  • 35. [Enter] • > 3+5 [Enter] • > 10-3 [Enter] • > 2*3 [Enter] • > 100/20 [Enter] • > (12 + 34 -56) * 78 / 90 [Enter] Saturday, November 26, 11 38
  • 36. • > 100^1/2 • > 100^(1/2) Saturday, November 26, 11 39
  • 40. “I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/ Saturday, November 26, 11 43
  • 42. sqrt() • > sqrt(2) • > sqrt(144) • > sqrt(104976) •[ ]2 • 2 3 1 • > 2^(1/3) Saturday, November 26, 11 45
  • 43. ( ) • •q() help(sth) • Saturday, November 26, 11 46
  • 49. “I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/ Saturday, November 26, 11 52
  • 51. “hako” • > hako <- c(1,2,3,4,5) • > hako • c() concatenate/combine • Saturday, November 26, 11 54
  • 52. c() “<-” hako <- c(1,2,3,4,5) “<-” ← Saturday, November 26, 11 55
  • 53. + ... • [Enter] • [STOP] • [Esc] Saturday, November 26, 11 56
  • 54. • Tab Saturday, November 26, 11 57
  • 55. hako 1 5 5 Saturday, November 26, 11 58
  • 57. > sqrt(hako) • > log(hako) Saturday, November 26, 11 60
  • 58. sqrt(1), sqrt(2) ... sqrt(5) log(1), log (2) ... log (5) Saturday, November 26, 11 61
  • 61. summary() • table() • sum() • length() Saturday, November 26, 11 64
  • 62. mean() • max(), min() • median() • sd() Saturday, November 26, 11 65
  • 63. •R • • q(), help(), sqrt(), log(), c() • Saturday, November 26, 11 66
  • 65. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 68
  • 66. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 69
  • 67. Sub topics 1. 2. 3. Saturday, November 26, 11 70
  • 70. ... • • • TOEIC Saturday, November 26, 11 73
  • 71. ... A 180 75 B 170 65 C 165 60 D 175 70 E 190 80 Saturday, November 26, 11 74
  • 74. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 77
  • 76. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 79
  • 77. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 80
  • 78. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 81
  • 80. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 83
  • 81. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 84
  • 82. 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 85
  • 85. matrix() • • matrix( , , ) • Saturday, November 26, 11 88
  • 86. A 180 75 B 170 65 C 165 60 D 175 70 E 190 80 Saturday, November 26, 11 89
  • 87. karada <- matrix(c(180, 170, 165, 175, 190, 75, 65, 60, 70, 80), 5, 2) 1. c() 2. matrix() • 5 2 3. karada Saturday, November 26, 11 90
  • 89. matrix(1:9,nrow=3,ncol=3) 1 4 7 2 5 8 3 6 9 Saturday, November 26, 11 92
  • 90. matrix(1:9,nrow=3,ncol=3,byrow=TRUE) 1 2 3 4 5 6 7 8 9 Saturday, November 26, 11 93
  • 91. 1. 2. Saturday, November 26, 11 94
  • 92. demo <- matrix(1:30,nrow=5,ncol=6) http://gyazo.com/76c58d5d6c8426a44f160897cda99671.png Saturday, November 26, 11 95
  • 93. 2 → demo[2,] 2 → demo[,2] http://gyazo.com/6726084afd9e1cc4b03df85fe6bc0f29.png Saturday, November 26, 11 96
  • 94. 2 4 → demo[c(2,4),] 2 4 → demo[, c(2,4)] Saturday, November 26, 11 97
  • 96. • • Saturday, November 26, 11 99
  • 97. Sub topics 1. 2. 3. Saturday, November 26, 11 100
  • 98. • • Saturday, November 26, 11 101
  • 99. B 175 65 B 177 70 B 174 75 A 179 70 O 170 60 Saturday, November 26, 11 102
  • 100. • Excel WS • • Saturday, November 26, 11 103
  • 101. ... • data.frame() (p.240) • (p.243) • (p.243) Saturday, November 26, 11 104
  • 103. “173.365 - Come on, feel the noise” by Je the Trojan http://www. ickr.com/photos/trojanguy/3046207115/ Saturday, November 26, 11 106
  • 105. Sub topics 1. 2. 3. Saturday, November 26, 11 108
  • 107. ... • Excel • → Saturday, November 26, 11 110
  • 108. ... • • Saturday, November 26, 11 111
  • 109. • Windows → • “MyDocuments” • Mac OS X → • Linux up to you... Saturday, November 26, 11 112
  • 110. • getwd() • > getwd() • setwd() • > setwd("/Users/sakaue/Desktop/") Saturday, November 26, 11 113
  • 111. • read.csv() • CSV • CSV: Comma Separated Value Saturday, November 26, 11 114
  • 112. 1. demo.csv • XLS/XLSX • CSV UTF-8 2. > test <- read.csv(“demo.csv”) 3. > test [Enter] Saturday, November 26, 11 115
  • 113. CSV ... Saturday, November 26, 11 116
  • 114. • read.delim() • • delim: delimiter Saturday, November 26, 11 117
  • 115. 1. demo.xls 2. > test2 <- read.delim("clipboard") Mac : read.delim(pipe(“pbpaste”)) 3. > test2 [Enter] Saturday, November 26, 11 118
  • 116. > table(test2[,1]) • 1 > mean(test2[,2]) • 2 > hist(test2[,2]) • 2 Saturday, November 26, 11 119
  • 117. • CSV read.csv() • or Saturday, November 26, 11 120
  • 118. CSV Excel “y2.d175 | Lasershow! Relax!” by B Rosen http://www.flickr.com/photos/rosengrant/4751386872/ Saturday, November 26, 11 121
  • 119. Excel SPSS Saturday, November 26, 11 122
  • 120. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 123
  • 121. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 124
  • 124. 1. 2. Saturday, November 26, 11 127
  • 125. 2 Excel SPSS ... orz Saturday, November 26, 11 128
  • 127. > age <- c(18, 23, 14, 19, 21, 29, 22, 21, 23, 19, 20, 20, 26, 18, 14, 6, 8, 16, 23, 20) > hist(age) Saturday, November 26, 11 130
  • 129. > score <- c(60, 50, 72, 43, 50, 55, 43, 50, 85, 40) > words <- c(340, 190, 465, 170, 130, 225,140, 310, 580, 120) > plot(score,words) Saturday, November 26, 11 132
  • 131. > high <- c(350, 285, 315, 340, 210, 185, 120, 740, 425, 155) > coll <- c(365, 570, 645, 540, 645, 665, 880, 550, 410, 585) > boxplot(high, coll, names=c("High", "Coll")) Saturday, November 26, 11 134
  • 132. 1. 2. 3. twitter, FB Saturday, November 26, 11 135
  • 133. Excel “y2.d175 | Lasershow! Relax!” by B Rosen http://www.flickr.com/photos/rosengrant/4751386872/ Saturday, November 26, 11 136
  • 134. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 137
  • 135. Agenda 1. R 2. 3. 4. 5. R Saturday, November 26, 11 138
  • 139. t, χ2, F Saturday, November 26, 11 142
  • 140. t t.test() Saturday, November 26, 11 143
  • 141. t > like <- c(6,10,6,10,7,8,7,9,10,4) > dislike <- c(3,5,6,4,4,8,4,5,4,7) > t.test(like,dislike,var.equal=TRUE) Saturday, November 26, 11 144
  • 142. t > t.test(like,dislike,var.equal=TRUE) Two Sample t-test data: like and dislike t = 3.3041, df = 18, p-value = 0.003946 alternative hypothesis: true difference in means is not equal to 0 # 95 percent confidence interval: # 0.9831754 4.4168246 sample estimates: mean of x mean of y 7.7 5.0 Saturday, November 26, 11 145
  • 143. t ... “ t Welch t Welch t ” http://aoki2.si.gunma-u.ac.jp/lecture/Average/bunsan1.html Saturday, November 26, 11 146
  • 145. ! ! ― Welch ― • http://oku.edu.mie-u.ac.jp/~okumura/blog/node/2262 • http://aoki2.si.gunma-u.ac.jp/lecture/BF/index.html • Donald W. Zimmerman, ``Some properties of preliminary tests of equality of variances in the two-sample location problem'', The Journal of General Psychology,Vol.123, pp.217-231 (1996) • The unequal variance t-test is an underused alternative to Student's t-test and the Mann- Whitney U test -- Ruxton 17 (4): 688 -- Behavioral Ecology • : Mann-Whitney U http://qdai.way- nifty.com/qjes/2005/02/mannwhitneyu.html Saturday, November 26, 11 148
  • 146. ... > t.test(like,dislike,var.equal=FALSE) Welch Two Sample t-test data: like and dislike t = 3.3041, df = 16.795, p-value = 0.004249 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 0.9743014 4.4256986 sample estimates: mean of x mean of y 7.7 5.0 Saturday, November 26, 11 149
  • 147. t t ... •t t ... • Student t t • s^2 s t ... • %E3%82%B4%E3%82%BB%E3%83%83%E3%83%88 http://ja.wikipedia.org/wiki/%E3%82%A6%E3%82%A3%E3%83%AA%E3%82%A2%E3%83%A0%E3%83%BB • http://ja.wikipedia.org/wiki/%E8%87%AA%E7%94%B1%E5%BA%A6 • http://mat.isc.chubu.ac.jp/fpr/fpr1997/0119.html • http://www.pol.geophys.tohoku.ac.jp/~hanawa/ori/ori/054.html Saturday, November 26, 11 150
  • 150. • • A B • Saturday, November 26, 11 153
  • 151. : “ ” “however” 109 347 8 493 [ ] , .... [ ] ..., , .... [ ] ..., . Saturday, November 26, 11 154
  • 152. > freq <- c(109,347,8) > chisq.test(freq,correct=FALSE) Chi-squared test for given probabilities data: freq X-squared = 391.7371, df = 2, p-value < 2.2e-16 # 2 # http://homepage2.nifty.com/nandemoarchive/toukei_kiso/t_F_chi.htm Saturday, November 26, 11 155
  • 155. •3 •t • ANOVA ANalysis Of VAriance •F F Saturday, November 26, 11 158
  • 156. A B C 10 9 6 8 7 4 9 4 3 6 5 9 9 2 2 5 8 6 7 4 2 9 2 4 8 8 3 10 4 9 Saturday, November 26, 11 159
  • 157. > test <- read.csv("demo.csv", head=T) > anova(lm(Class ~ Score, data=test)) Analysis of Variance Table Response: Class Df Sum Sq Mean Sq F value Pr(>F) Score 1 5.2389 5.2389 9.9376 0.00384 ** Residuals 28 14.7611 0.5272 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Saturday, November 26, 11 160
  • 160. One more thing... Saturday, November 26, 11 163
  • 161. Hi oshima. Saturday, November 26, 11 164
  • 162. HiRoshima.R • R • 2-3 • • ... Saturday, November 26, 11 165
  • 163. HiRoshima.R • ... • R • Tsukuba.R / Tokyo.R / Osaka.R / Nagoya.R • Internet (computer) literacy • ... Saturday, November 26, 11 166
  • 164. HiRoshima.R •R • HiRoshima.R • !! Saturday, November 26, 11 168
  • 165. 1 22 14% 23% 64% Saturday, November 26, 11 169
  • 166. HiRoshima.R • →Lightning Talks • • Saturday, November 26, 11 171
  • 167. HiRoshima.R • • R R • • • • Saturday, November 26, 11 172
  • 168. HiRoshima.R • + Speaker !! • • • •R •R Saturday, November 26, 11 173
  • 169. HiRoshima.R • • 1 • 2 #1 • 3 Lightning Talks • Saturday, November 26, 11 174
  • 170. •Speaker • • Lightning Talks • R OK • 5 OK Saturday, November 26, 11 176
  • 171. •Feedback • blog / twitter • #HiRoshimaR @sakaue • Saturday, November 26, 11 177
  • 175. 2,940 1,785 3,780 Saturday, November 26, 11 181
  • 176. Excel SPSS Saturday, November 26, 11 182
  • 177. twitter: @sakaue e-mail: tsakaue<AT>hiroshima-u.ac.jp Saturday, November 26, 11 183