SlideShare ist ein Scribd-Unternehmen logo
1 von 107
Downloaden Sie, um offline zu lesen
40

                                   SAKAUE Akkuş Tatsuya
                          2011-12-17


Tuesday, December 6, 11                                   1
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   7
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   8
•
         •                     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


         •

Tuesday, December 6, 11                                                                                    9
Tuesday, December 6, 11   10
•                IBM SPSS Statistics   10   ...


         •
         •
Tuesday, December 6, 11                                    11
Excel     SPSS   ...
        •
        •
                          • Excel
        •
Tuesday, December 6, 11                          12
-Install / Update / Uninstall-



Tuesday, December 6, 11                 14
1. http://www.r-project.org/
           2. “download R”
           3. JAPAN
           4.                OS


Tuesday, December 6, 11                   15
• 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)



Tuesday, December 6, 11                                                   16
Tuesday, December 6, 11   17
Tuesday, December 6, 11   18
Tuesday, December 6, 11   19
Tuesday, December 6, 11   20
Tuesday, December 6, 11   21
Tuesday, December 6, 11   22
1. http://www.r-project.org/
                  2.

                  3.


Tuesday, December 6, 11                          23
•

                          •

            •                 Windows
                          •


Tuesday, December 6, 11                 24
• Windows
         • [ Windows XP]         →

         • [ Windows 7 ]        →


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


Tuesday, December 6, 11                                     25
• Windows
            • START → Program → R → R 2.14.0
      • Mac OS X
            • /Applications   R


                          R

Tuesday, December 6, 11                        26
• Windows       Mac OS X
                1. q()
                2.
                3.            R


Tuesday, December 6, 11              27
...
               •        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/)




Tuesday, December 6, 11                                                               28
•
            •
            •             help(sth) !!


Tuesday, December 6, 11                  29
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   31
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   32
Tuesday, December 6, 11   33
•                      [Enter]
                          • > 3+5 [Enter]
                          • > 10-3 [Enter]
                          • > 2*3 [Enter]
                          • > 100/20 [Enter]
                          • > (12 + 34 -56) * 78 / 90 [Enter]
Tuesday, December 6, 11                                         34
Tuesday, December 6, 11   35
Tuesday, December 6, 11   36
“I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/
Tuesday, December 6, 11                                                                             37
Tuesday, December 6, 11   38
sqrt()

                          • > sqrt(2)
                          • > sqrt(144)
                          • > sqrt(104976)
Tuesday, December 6, 11                      39
(   )

      •
      •q()                help(sth)

      •
Tuesday, December 6, 11                40
Tuesday, December 6, 11   41
Tuesday, December 6, 11   42
Tuesday, December 6, 11   43
Tuesday, December 6, 11   44
“I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/
Tuesday, December 6, 11                                                                             45
Tuesday, December 6, 11   46
“hako”

     •        > hako <- c(1,2,3,4,5)
     •        > hako
                • c()     concatenate/combine
                •
Tuesday, December 6, 11                         47
c()    “<-”

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

                                 ←

Tuesday, December 6, 11                 48
+        ...


                    •                [Enter]


                          • [STOP]
                          • [Esc]

Tuesday, December 6, 11                              49
•
                    •     Tab


Tuesday, December 6, 11         50
hako


               1          5          5



Tuesday, December 6, 11                  51
Tuesday, December 6, 11   52
•     > sqrt(hako)

                    • > log(hako)

Tuesday, December 6, 11                  53
sqrt(1), sqrt(2) ... sqrt(5)
                           log(1), log (2) ... log (5)

Tuesday, December 6, 11                                  54
Tuesday, December 6, 11   55
•R
             •
               • q(), help(), sqrt(), log(), c()
             •
Tuesday, December 6, 11                            56
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   57
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   58
Tuesday, December 6, 11   59
Tuesday, December 6, 11   60
Tuesday, December 6, 11   61
...

           •
           •
           •              TOEIC

Tuesday, December 6, 11           62
...

                          A   180     75
                          B   170     65
                          C   165     60
                          D   175     70
                          E   190     80
Tuesday, December 6, 11                    63
...

              • Excel
              •
                    →


Tuesday, December 6, 11         64
•                ...

                          •
                          •
Tuesday, December 6, 11             65
• Windows            →
                •       “MyDocuments”

             • Mac OS X           →

             • Linux up to you...

Tuesday, December 6, 11                 66
•
                          • getwd()
                             • > getwd()
                          • setwd()
                             •   > setwd("/Users/sakaue/Desktop/")




Tuesday, December 6, 11                                              67
• read.csv()
               • CSV
               • CSV: Comma Separated Value

Tuesday, December 6, 11                       68
1. demo.csv
                      • XLS/XLSX
                      • CSV                UTF-8

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

           3. > test [Enter]


Tuesday, December 6, 11                            69
CSV
                                ...



Tuesday, December 6, 11               70
• read.delim()
               •
               • delim: delimiter

Tuesday, December 6, 11             71
1. demo.xls
        2. > test2 <- read.delim("clipboard")
                          Mac   : read.delim(pipe(“pbpaste”))

        3. > test2 [Enter]



Tuesday, December 6, 11                                         72
> table(test2[,1])
                          •            1

                  > mean(test2[,2])
                          •            2

                  > hist(test2[,2])
                          •            2


Tuesday, December 6, 11                    73
•
         • CSV                 read.csv()

         •                or



Tuesday, December 6, 11                     74
CSV


                          Excel


                                  “y2.d175 | Lasershow! Relax!” by B Rosen
                                  http://www.flickr.com/photos/rosengrant/4751386872/
Tuesday, December 6, 11                                                           75
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   77
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   78
Tuesday, December 6, 11   79
Tuesday, December 6, 11   80
1.
                  2.



Tuesday, December 6, 11   81
2

                          Excel       SPSS
                                      ... orz
Tuesday, December 6, 11                         82
Tuesday, December 6, 11   83
> age <- c(18, 23, 14, 19,
                   21, 29, 22, 21, 23, 19, 20, 20,
                   26, 18, 14, 6, 8, 16, 23, 20)
                   > hist(age)

Tuesday, December 6, 11                              84
Tuesday, December 6, 11   85
> 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)

Tuesday, December 6, 11                            86
Tuesday, December 6, 11   87
> nns <- c(350, 285, 315, 340, 210,
            185, 120, 740, 425, 155)
            > ns <- c(365, 570, 645, 540, 645,
            665, 880, 550, 410, 585)
            > boxplot(nns, ns, names=c("NNS", "NS"))


Tuesday, December 6, 11                                88
1.

                  2.

                  3.

                          twitter, FB

Tuesday, December 6, 11                 89
Excel

                          “y2.d175 | Lasershow! Relax!” by B Rosen
                          http://www.flickr.com/photos/rosengrant/4751386872/
Tuesday, December 6, 11                                                   90
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   91
Agenda
                          1. R
                          2.
                          3.
                          4.
                          5. R

Tuesday, December 6, 11                   92
Tuesday, December 6, 11   93
t




Tuesday, December 6, 11       94
t




Tuesday, December 6, 11       95
•                      H0

   •                      H1

   •       H0                  (t, χ2, F )

   •


Tuesday, December 6, 11                      96
t

                 •

                 •R       t.test()



Tuesday, December 6, 11              97
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)




Tuesday, December 6, 11                      98
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

Tuesday, December 6, 11                           99
Tuesday, December 6, 11   101
•
                •

                •         A   B

          •

Tuesday, December 6, 11           102
:        “however”



                                  109     347        8   493

                              [   ] However, ....
                              [   ] ..., however, ....
                              [   ] ..., however.

Tuesday, December 6, 11                                        103
> 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




Tuesday, December 6, 11                                                       104
•
                          •   t
                          •
              •                   !
                          •           ...


Tuesday, December 6, 11                     106
Tuesday, December 6, 11   107
One more thing...


Tuesday, December 6, 11                  108
Package



Tuesday, December 6, 11   109
Package

        •
                   •      base         1,000
                   •                package
                   •                   ex. RMeCab




Tuesday, December 6, 11                             110
RMeCab



Tuesday, December 6, 11      111
RMeCab
                •
                      •R    MeCab


                      •             R



Tuesday, December 6, 11                 112
• RMeCabText() :
          • RMeCabFreq() :
          • Ngram() : N-gram
          • collocate() :
Tuesday, December 6, 11        114
Tuesday, December 6, 11   115
Tuesday, December 6, 11   117
2,940     1,785   3,780

Tuesday, December 6, 11                   119
twitter: @sakaue

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




Tuesday, December 6, 11                                          121

Weitere ähnliche Inhalte

Mehr von 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
 

Mehr von 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 入門者講習資料
 

Kürzlich hochgeladen

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Introduction to "R" for Language Researchers

  • 1. 40 SAKAUE Akkuş Tatsuya 2011-12-17 Tuesday, December 6, 11 1
  • 2. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 7
  • 3. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 8
  • 4. • 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 • Tuesday, December 6, 11 9
  • 6. IBM SPSS Statistics 10 ... • • Tuesday, December 6, 11 11
  • 7. Excel SPSS ... • • • Excel • Tuesday, December 6, 11 12
  • 8. -Install / Update / Uninstall- Tuesday, December 6, 11 14
  • 9. 1. http://www.r-project.org/ 2. “download R” 3. JAPAN 4. OS Tuesday, December 6, 11 15
  • 10. • 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) Tuesday, December 6, 11 16
  • 17. 1. http://www.r-project.org/ 2. 3. Tuesday, December 6, 11 23
  • 18. • • Windows • Tuesday, December 6, 11 24
  • 19. • Windows • [ Windows XP] → • [ Windows 7 ] → • Mac OS X • /Applications /Library Frameworks R. framework CleanApp Tuesday, December 6, 11 25
  • 20. • Windows • START → Program → R → R 2.14.0 • Mac OS X • /Applications R R Tuesday, December 6, 11 26
  • 21. • Windows Mac OS X 1. q() 2. 3. R Tuesday, December 6, 11 27
  • 22. ... • 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/) Tuesday, December 6, 11 28
  • 23. • • help(sth) !! Tuesday, December 6, 11 29
  • 24. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 31
  • 25. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 32
  • 27. [Enter] • > 3+5 [Enter] • > 10-3 [Enter] • > 2*3 [Enter] • > 100/20 [Enter] • > (12 + 34 -56) * 78 / 90 [Enter] Tuesday, December 6, 11 34
  • 30. “I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/ Tuesday, December 6, 11 37
  • 32. sqrt() • > sqrt(2) • > sqrt(144) • > sqrt(104976) Tuesday, December 6, 11 39
  • 33. ( ) • •q() help(sth) • Tuesday, December 6, 11 40
  • 38. “I don't know !” by fmgbain http://www.flickr.com/photos/fmgbain/4382010455/ Tuesday, December 6, 11 45
  • 40. “hako” • > hako <- c(1,2,3,4,5) • > hako • c() concatenate/combine • Tuesday, December 6, 11 47
  • 41. c() “<-” hako <- c(1,2,3,4,5) “<-” ← Tuesday, December 6, 11 48
  • 42. + ... • [Enter] • [STOP] • [Esc] Tuesday, December 6, 11 49
  • 43. • Tab Tuesday, December 6, 11 50
  • 44. hako 1 5 5 Tuesday, December 6, 11 51
  • 46. > sqrt(hako) • > log(hako) Tuesday, December 6, 11 53
  • 47. sqrt(1), sqrt(2) ... sqrt(5) log(1), log (2) ... log (5) Tuesday, December 6, 11 54
  • 49. •R • • q(), help(), sqrt(), log(), c() • Tuesday, December 6, 11 56
  • 50. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 57
  • 51. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 58
  • 55. ... • • • TOEIC Tuesday, December 6, 11 62
  • 56. ... A 180 75 B 170 65 C 165 60 D 175 70 E 190 80 Tuesday, December 6, 11 63
  • 57. ... • Excel • → Tuesday, December 6, 11 64
  • 58. ... • • Tuesday, December 6, 11 65
  • 59. • Windows → • “MyDocuments” • Mac OS X → • Linux up to you... Tuesday, December 6, 11 66
  • 60. • getwd() • > getwd() • setwd() • > setwd("/Users/sakaue/Desktop/") Tuesday, December 6, 11 67
  • 61. • read.csv() • CSV • CSV: Comma Separated Value Tuesday, December 6, 11 68
  • 62. 1. demo.csv • XLS/XLSX • CSV UTF-8 2. > test <- read.csv(“demo.csv”) 3. > test [Enter] Tuesday, December 6, 11 69
  • 63. CSV ... Tuesday, December 6, 11 70
  • 64. • read.delim() • • delim: delimiter Tuesday, December 6, 11 71
  • 65. 1. demo.xls 2. > test2 <- read.delim("clipboard") Mac : read.delim(pipe(“pbpaste”)) 3. > test2 [Enter] Tuesday, December 6, 11 72
  • 66. > table(test2[,1]) • 1 > mean(test2[,2]) • 2 > hist(test2[,2]) • 2 Tuesday, December 6, 11 73
  • 67. • CSV read.csv() • or Tuesday, December 6, 11 74
  • 68. CSV Excel “y2.d175 | Lasershow! Relax!” by B Rosen http://www.flickr.com/photos/rosengrant/4751386872/ Tuesday, December 6, 11 75
  • 69. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 77
  • 70. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 78
  • 73. 1. 2. Tuesday, December 6, 11 81
  • 74. 2 Excel SPSS ... orz Tuesday, December 6, 11 82
  • 76. > age <- c(18, 23, 14, 19, 21, 29, 22, 21, 23, 19, 20, 20, 26, 18, 14, 6, 8, 16, 23, 20) > hist(age) Tuesday, December 6, 11 84
  • 78. > 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) Tuesday, December 6, 11 86
  • 80. > nns <- c(350, 285, 315, 340, 210, 185, 120, 740, 425, 155) > ns <- c(365, 570, 645, 540, 645, 665, 880, 550, 410, 585) > boxplot(nns, ns, names=c("NNS", "NS")) Tuesday, December 6, 11 88
  • 81. 1. 2. 3. twitter, FB Tuesday, December 6, 11 89
  • 82. Excel “y2.d175 | Lasershow! Relax!” by B Rosen http://www.flickr.com/photos/rosengrant/4751386872/ Tuesday, December 6, 11 90
  • 83. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 91
  • 84. Agenda 1. R 2. 3. 4. 5. R Tuesday, December 6, 11 92
  • 88. H0 • H1 • H0 (t, χ2, F ) • Tuesday, December 6, 11 96
  • 89. t • •R t.test() Tuesday, December 6, 11 97
  • 90. 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) Tuesday, December 6, 11 98
  • 91. 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 Tuesday, December 6, 11 99
  • 93. • • A B • Tuesday, December 6, 11 102
  • 94. : “however” 109 347 8 493 [ ] However, .... [ ] ..., however, .... [ ] ..., however. Tuesday, December 6, 11 103
  • 95. > 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 Tuesday, December 6, 11 104
  • 96. • t • • ! • ... Tuesday, December 6, 11 106
  • 98. One more thing... Tuesday, December 6, 11 108
  • 100. Package • • base 1,000 • package • ex. RMeCab Tuesday, December 6, 11 110
  • 102. RMeCab • •R MeCab • R Tuesday, December 6, 11 112
  • 103. • RMeCabText() : • RMeCabFreq() : • Ngram() : N-gram • collocate() : Tuesday, December 6, 11 114
  • 106. 2,940 1,785 3,780 Tuesday, December 6, 11 119
  • 107. twitter: @sakaue e-mail: tsakaue<AT>hiroshima-u.ac.jp Tuesday, December 6, 11 121