Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RBC202003_Day2_Period5
Search
sakaue
March 20, 2020
Education
0
36
RBC202003_Day2_Period5
sakaue
March 20, 2020
Tweet
Share
More Decks by sakaue
See All by sakaue
SappoRo.R #11「R によるThe Multilingual Eye-tracking COrpus (MECO) の探索的データ分析」
sakaue
0
82
RBC202003_Day2_Period6
sakaue
0
84
RBC202003_Day2_Period7
sakaue
0
80
Rbootcamp202003_Day2_p8.pdf
sakaue
0
76
RBC202003_Day1_Period1
sakaue
1
63
RBC202003_Day1_Period2
sakaue
0
62
RBC202003_Day1_Period3
sakaue
0
83
RBC202003_Day1_Period4
sakaue
0
48
Other Decks in Education
See All in Education
ThingLink
matleenalaakso
28
4.1k
著作権と授業に関する出前講習会/dme-2025-05-01
gnutar
0
200
プレゼンテーション実践
takenawa
0
3.3k
Visualisation Techniques - Lecture 8 - Information Visualisation (4019538FNR)
signer
PRO
0
2.4k
サンキッズゾーン 春日井駅前 ご案内
sanyohomes
0
250
教員向け生成AI基礎講座(2025年3月28日 東京大学メタバース工学部 ジュニア講座)
luiyoshida
1
530
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2k
Case Studies and Course Review - Lecture 12 - Information Visualisation (4019538FNR)
signer
PRO
1
2k
新卒交流ワークショップ
pokotyamu
0
380
Data Management and Analytics Specialisation
signer
PRO
0
1.4k
SkimaTalk Teacher Guidelines
skimatalk
0
780k
マネジメント「される側」 こそ覚悟を決めろ
nao_randd
10
5.3k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Cult of Friendly URLs
andyhume
79
6.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
How to Ace a Technical Interview
jacobian
276
23k
Faster Mobile Websites
deanohume
307
31k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
Building Adaptive Systems
keathley
43
2.6k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Transcript
2020-03-20 ୈ5ݶ σʔλͷཁ bootcamp
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
1. σʔλͷཁͷඞཁੑ • σʔλΛूΊ͚ͨͩͰԿஅͰ͖ͳ͍ • σʔλΛཁʢཁʣΛ͢Δ͜ͱͰɼશମ͕ Ͳ͏ͳ͍ͬͯͯɼΒ͖͕ͭͲ͏ͳ͍ͬͯ Δ͔͕ѲͰ͖Δ • தؒςετͰऔͬͨ55ྑ͍ʁɼѱ͍ʁ
• ظςετͷฏۉ͕80ͷ߹ɼશମతʹྑ͍Ͱ͖͙͍͋ʁ • ฏۉɾΒ͖ͭʢSDʣʹΑΔʢ͠ɼςετͷ༰ ʹΑΔʢ͠ɼԿΛ͔֬Ί͍͔ͨʹΑΔʣʣ
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
• sum() ؔ • x <- c(1, 2, 3, 4,
5) • sum(x) • sum(x[2 : 4]) • ϕΫτϧͷ2൪͔Β4൪ͷཁૉͷ૯ • y <- c(1:1000) • sum(y) • sum(y[27:89]) 2. ϕΫτϧΛͬͨཁ
• mean() ؔ: ฏۉΛٻΊΔ • ฏۉ: σʔλͷ૯ΛσʔλͷݸͰׂͬͨ • mean(x); mean(y)
• median() ؔ: தԝΛٻΊΔ • தԝ: খ͍͞ॱʹฒͨ࣌ʹਅΜதͷॱҐʹ͘Δ • median(x); median(y) • ฏۉͷ᠘ • ۃͳ͕ࠞ͟ΔͱӨڹΛड͚ͯ͠·͏ • a <- c(100, 200, 300, 400, 500) • mean(a); median(a) • b <- c(100, 200, 300, 400, 5000) • mean(b); median(b) 2. ϕΫτϧΛͬͨཁ
• max() ؔ: ࠷େΛٻΊΔ • min() ؔ: ࠷খΛٻΊΔ • var()
ؔ: ࢄΛٻΊΔ • sd() ؔ: ඪ४ภࠩΛٻΊΔ • summary() ؔ: ཁ౷ܭྔΛҰʹٻΊΔ • ࠷খ, தԝ, ฏۉ, ࠷େ, Լଆ25%, ্ଆ25% • max(x); max(y) • min(x); min(y) • var(x);var(y) • sd(x); sd(y) • summary(x); summary(y) 2. ϕΫτϧΛͬͨཁ
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
3. ߦྻΛͬͨཁ • ѻ͍ํϕΫτϧͷཁͱಉ͡ • matrix.4 <- matrix(c(1, 2, 3,
4, 5, 6, 7, 8, 9), nrow = 3, ncol = 3, byrow = TRUE) • matrix.4 ͰதΛ֬ೝ • sum(matrix.4) #ߦྻʹ͋Δͷ૯ • mean(matrix.4) #ߦྻશମͷฏۉ • sum(matrix.4[1,]) #ߦྻ1ߦͷ૯ • mean(matrix.4[,2:3]) #ߦྻ2-3ྻͷฏۉ
3. ߦྻΛͬͨཁ • ͪΐͬͱɾཁૉΛେ͖ͯ͘͠Έ·͠ΐ͏ • matrix.5 <- matrix(c(1:5000), nrow =
100, ncol = 50, byrow = TRUE) • matrix.5 ͰதΛ֬ೝ • sum(matrix.5) #ߦྻʹ͋Δͷ૯ • mean(matrix.5) #ߦྻશମͷฏۉ
3. ߦྻΛͬͨཁ • rowSums() ؔ; colSums() ؔ; • ߦ͝ͱྻ͝ͱʹ૯ΛٻΊΔؔ •
rowSums(matrix.4); rowSums(matrix.5) • colSums(matrix.4); colSums(matrix.5) • rowMeans () ؔ; colMeans() ؔ • ߦ͝ͱྻ͝ͱʹฏۉΛٻΊΔؔ • rowMeans(matrix.4); rowMeans(matrix.5) • colMeans(matrix.4); colMeans(matrix.5)
3. ߦྻΛͬͨཁ • apply() ؔ • ߦ͝ͱྻ͝ͱʹ༷ʑͳؔΛద༻ • apply(ߦྻ໊, Ϛʔδϯ,
ద༻͢Δؔʣ • Ϛʔδϯ͕1ͳΒߦ͝ͱɼ2ͳΒྻ͝ͱ • apply(matrix.4, 1, sum) #ߦ͝ͱͷ૯ • rowSums(matrix.4) ͱಉ͡ॲཧ • apply(matrix.4, 2, mean) #ྻ͝ͱͷฏۉ • colMeans(matrix.4) ͱಉ͡ॲཧ
3. ߦྻΛͬͨཁ • apply() ؔͷଓ͖ • apply(matrix.4, 1, max) •
#ߦ͝ͱͷ࠷େ • apply(matrix.4, 2, summary) • #ྻ͝ͱͷཁ౷ܭྔ
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
Agenda 1. σʔλͷཁͷඞཁੑ (5) 2. ϕΫτϧΛͬͨཁ (20) 3. ߦྻΛͬͨཁ (20)
4. ԋशʹ͙࣍ԋश (45)
4. ԋशʹ͙࣍ԋश 1. 1͔Β50͔Β·Ͱͷ͕ೖͬͨϕΫτ ϧΛ࡞ͯ͠… 1. ૯, ฏۉ, தԝ, ࠷େ,
࠷খ , ࢄ, ඪ४ภࠩΛٻΊΔ 2. ཁ౷ܭྔΛٻΊΔ
4. ԋशʹ͙࣍ԋशʢώϯτʣ 1. Λൃੜͤ͞ΔʹίϩϯΛ͍·͠ΐ͏ 1. ֤ؔΛηϛίϩϯͰͭͳ͍ͰҰؾʹ࣮ߦ 2. summary() ؔΛ͍·͢
2. 1͔Β10000·Ͱͷ͕ೖͬͨߦྻʢ100ߦɾ100ྻʣΛ࡞ͯ͠… 1. 20ߦʮͱʯ70ߦͷ2ߦͷΈͷ֤૯ΛٻΊΔ 2. 31ྻʮ͔Βʯ80ྻ·Ͱͷ50ྻͷ֤ฏۉΛٻΊΔ 3. ߦ͝ͱɾྻ͝ͱͷ૯ΛٻΊΔʢapply ؔΛ༻ʣ 4.
ߦ͝ͱɾྻ͝ͱͷฏۉΛٻΊΔʢapply ؔΛ༻ʣ 5. ߦ͝ͱɾྻ͝ͱͷཁ౷ܭྔΛٻΊΔʢapply ؔΛ༻ʣ 6. psych ύοέʔδΛͬͯཁ౷ܭྔΛٻΊΔ • ҙͷߦɾྻʹରͯ͠ٻΊͯΈΔ 4. ԋशʹ͙࣍ԋश
2. matrix() ؔΛ͍ɼྻͷࢦఆͱ byrow ͷઃఆʹ༻৺ 1. ߦͷෳࢦఆ c() ؔΛ͍·͠ΐ͏ 2.
ྻͷൣғࢦఆίϩϯΛ͍·͠ΐ͏ 3. apply() ؔͱ sum() ؔΛΈ߹Θͤ·͠ΐ͏ 4. apply() ؔͱ mean() ؔΛΈ߹Θͤ·͠ΐ͏ 5. apply() ؔͷߦͱྻͷࢦఆɼ1 ͔ 2 Ͱ͚·͢ 6. ·ͣ install.packages() ͯ͠ library() Ͱ༗ޮԽ 4. ԋशʹ͙࣍ԋशʢώϯτʣ
Enjoy ! twitter: @sakaue e-mail: tsakaue<AT>hiroshima-u.ac.jp