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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sakaue
March 20, 2020
Education
51
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RBC202003_Day2_Period5
sakaue
March 20, 2020
More Decks by sakaue
See All by sakaue
SappoRo.R #11「R によるThe Multilingual Eye-tracking COrpus (MECO) の探索的データ分析」
sakaue
0
120
RBC202003_Day2_Period6
sakaue
0
110
RBC202003_Day2_Period7
sakaue
0
110
Rbootcamp202003_Day2_p8.pdf
sakaue
0
98
RBC202003_Day1_Period1
sakaue
1
94
RBC202003_Day1_Period2
sakaue
0
83
RBC202003_Day1_Period3
sakaue
0
110
RBC202003_Day1_Period4
sakaue
0
69
Other Decks in Education
See All in Education
自己紹介 / who-am-i
yasulab
6
6.9k
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
270
[2026前期火5] 論理学(京都大学文学部 前期 第2回)「論理的な正しさはどこにあるのか」
yatabe
0
930
Laura Wilson - The Quarterly PR Pivot
laurawilsonbseo1
1
340
The Art & Science of Elearning
tmiket
1
220
AI-Based Speaking Assessment of a Short-Term Study Abroad Program
uranoken
0
230
0513
cbtlibrary
0
190
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.3k
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
2.3k
Data Management and Analytics Specialisation
signer
PRO
0
1.8k
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
現場最前線から教えるデータサイエンス1 -ITベンダーにおけるデータサイエンティスト-
hidetoshikawaguchi
0
110
Featured
See All Featured
Fireside Chat
paigeccino
42
3.9k
Side Projects
sachag
455
43k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
We Are The Robots
honzajavorek
0
240
Test your architecture with Archunit
thirion
1
2.3k
WCS-LA-2024
lcolladotor
0
620
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
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