# 第６回 関数とフロー制御

W

## Recommended

249 views13 slides

437 views9 slides

371 views12 slides

472 views21 slides

238 views11 slides

385 views9 slides

## What's hot

169 views8 slides

316 views23 slides

560 views39 slides
Algebra and Trigonometry 9th Edition Larson Solutions Manual by
Algebra and Trigonometry 9th Edition Larson Solutions Manualkejeqadaqo
2.6K views163 slides
Computer fandamental bangla by soikot pdf by
Computer fandamental bangla by soikot pdfShifat Ahmed
5.3K views27 slides
Fractions EB7.pdf by
Fractions EB7.pdfMaths avec TOMKO
417 views46 slides

### What's hot(20)

Wataru Shito169 views

Wataru Shito316 views

Wataru Shito560 views
Algebra and Trigonometry 9th Edition Larson Solutions Manual by kejeqadaqo
Algebra and Trigonometry 9th Edition Larson Solutions Manual
Computer fandamental bangla by soikot pdf by Shifat Ahmed
Computer fandamental bangla by soikot pdf
Shifat Ahmed5.3K views
Sietmas de 4x4 by Edgar Mata
Sietmas de 4x4
Edgar Mata8.8K views
Sistmas de 6x6 by Edgar Mata
Sistmas de 6x6
Edgar Mata21.7K views
Kunci Jawaban kalkulus edisi 9[yunusFairVry.blogspot.com].pdf by MutiaraPutri41
Kunci Jawaban kalkulus edisi 9[yunusFairVry.blogspot.com].pdf
MutiaraPutri41180 views
Sistmas de 8x8 by Edgar Mata
Sistmas de 8x8
Edgar Mata5.8K views
Sistmas de 10x10 by Edgar Mata
Sistmas de 10x10
Edgar Mata10.7K views
Vedic Mathematics- Combined operation Sum and Product of Numbers by culturalcomputingindia
Vedic Mathematics- Combined operation Sum and Product of Numbers
ceb - 2013 - éveil - formation historique et géographique (ressource 9966) by LeSoir.be
ceb - 2013 - éveil - formation historique et géographique (ressource 9966)
LeSoir.be57.9K views

## Similar to 第６回 関数とフロー制御

سلسلة الليالى العشر فى الرياضيات للصف الثانى الابتدائى ترم اول by
سلسلة الليالى العشر فى الرياضيات للصف الثانى الابتدائى ترم اولأمنية وجدى
9.2K views25 slides
The Ring programming language version 1.9 book - Part 69 of 210 by
The Ring programming language version 1.9 book - Part 69 of 210Mahmoud Samir Fayed
20 views10 slides
The Ring programming language version 1.5.3 book - Part 69 of 184 by
The Ring programming language version 1.5.3 book - Part 69 of 184Mahmoud Samir Fayed
15 views10 slides
Hand book of Howard Anton calculus exercises 8th edition by
Hand book of Howard Anton calculus exercises 8th editionPriSim
30.3K views676 slides
Useful javascript by
Useful javascriptLei Kang
286 views28 slides
11o Φ.Α. 8.1.pdf by
11o Φ.Α. 8.1.pdfAnthimos Misailidis
373 views2 slides

### Similar to 第６回 関数とフロー制御(20)

سلسلة الليالى العشر فى الرياضيات للصف الثانى الابتدائى ترم اول by أمنية وجدى
سلسلة الليالى العشر فى الرياضيات للصف الثانى الابتدائى ترم اول
أمنية وجدى9.2K views
The Ring programming language version 1.9 book - Part 69 of 210 by Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 69 of 210
The Ring programming language version 1.5.3 book - Part 69 of 184 by Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 69 of 184
Hand book of Howard Anton calculus exercises 8th edition by PriSim
Hand book of Howard Anton calculus exercises 8th edition
PriSim30.3K views
Useful javascript by Lei Kang
Useful javascript
Lei Kang286 views
Takeshi Arabiki23.6K views
سلسلة الليالى العشر فى الرياضيات للصف الثالث الابتدائى ترم اول by أمنية وجدى
سلسلة الليالى العشر فى الرياضيات للصف الثالث الابتدائى ترم اول
أمنية وجدى6.9K views
A Course in Fuzzy Systems and Control Matlab Chapter two by Chung Hua Universit
A Course in Fuzzy Systems and Control Matlab Chapter two
Functional Gradient Boosting based on Residual Network Perception by Atsushi Nitanda
Functional Gradient Boosting based on Residual Network Perception
Atsushi Nitanda147 views

Wataru Shito116 views
HSK 7-9 V2021 Chinese Grammar Sample.pdf by LEGOO MANDARIN
HSK 7-9 V2021 Chinese Grammar Sample.pdf
LEGOO MANDARIN74 views
Palestra sobre Collections com Python by pugpe
Palestra sobre Collections com Python
pugpe1.5K views
HSK 1 Chinese Grammar V2021 (2023 Updates) Sample.pdf by LEGOO MANDARIN
HSK 1 Chinese Grammar V2021 (2023 Updates) Sample.pdf
LEGOO MANDARIN650 views

## More from Wataru Shito

364 views3 slides

217 views7 slides

94 views5 slides

93 views25 slides

116 views10 slides

226 views107 slides

### More from Wataru Shito(20)

Wataru Shito364 views

Wataru Shito217 views

Wataru Shito94 views

Wataru Shito93 views

Wataru Shito116 views

Wataru Shito226 views

Wataru Shito226 views
マクロ経済学I 「第８章 総需要・総供給分析（AD-AS分析）」 by Wataru Shito
Wataru Shito432 views

Wataru Shito249 views
マクロ経済学I 「第１０章 総需要 II．IS-LM分析とAD曲線」 by Wataru Shito
Wataru Shito436 views

Wataru Shito300 views

Wataru Shito379 views
マクロ経済学I 「第９章 総需要 I」 by Wataru Shito
マクロ経済学I 「第９章 総需要 I」
Wataru Shito582 views

Wataru Shito269 views
マクロ経済学I 「第６章 開放経済の長期分析」 by Wataru Shito
マクロ経済学I 「第６章 開放経済の長期分析」
Wataru Shito777 views

Wataru Shito295 views
マクロ経済学I 「第４，５章 貨幣とインフレーション」 by Wataru Shito
マクロ経済学I 「第４，５章 貨幣とインフレーション」
Wataru Shito620 views
マクロ経済学I 「第３章 長期閉鎖経済モデル」 by Wataru Shito
マクロ経済学I 「第３章 長期閉鎖経済モデル」
Wataru Shito781 views

Wataru Shito306 views

Wataru Shito237 views

CRIJ4385_Death Penalty_F23.pptx by
CRIJ4385_Death Penalty_F23.pptxyvettemm100
6 views24 slides
Survey on Factuality in LLM's.pptx by
Survey on Factuality in LLM's.pptxNeethaSherra1
6 views9 slides
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx by
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptxDataScienceConferenc1
5 views12 slides
CRM stick or twist.pptx by
CRM stick or twist.pptxinfo828217
10 views16 slides
MOSORE_BRESCIA by
MOSORE_BRESCIAFederico Karagulian
5 views8 slides
5 views9 slides

CRIJ4385_Death Penalty_F23.pptx by yvettemm100
CRIJ4385_Death Penalty_F23.pptx
yvettemm1006 views
Survey on Factuality in LLM's.pptx by NeethaSherra1
Survey on Factuality in LLM's.pptx
NeethaSherra16 views
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx by DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
CRM stick or twist.pptx by info828217
CRM stick or twist.pptx
info82821710 views
Short Story Assignment by Kelly Nguyen by kellynguyen01
Short Story Assignment by Kelly Nguyen
kellynguyen0119 views
Data Journeys Hard Talk workshop final.pptx by info828217
Data Journeys Hard Talk workshop final.pptx
info82821710 views
CRM stick or twist workshop by info828217
CRM stick or twist workshop
info8282179 views
Cross-network in Google Analytics 4.pdf by GA4 Tutorials
GA4 Tutorials6 views
Data about the sector workshop by info828217
info82821712 views
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation by DataScienceConferenc1
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M... by DataScienceConferenc1
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
UNEP FI CRS Climate Risk Results.pptx by pekka28
UNEP FI CRS Climate Risk Results.pptx
pekka2811 views
SUPER STORE SQL PROJECT.pptx by khan888620
SUPER STORE SQL PROJECT.pptx
khan88862012 views

### 第６回 関数とフロー制御

• 1. 6 2020 3 8 1 1 2 1 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 5 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.1 if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.2 ifelse() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.3 switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2.1 for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2.2 while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 apply . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1 • • 2 csv read.csv() data.frame() 1
• 2. 2.1 6 2.1 function() Hello World! hello() 1 + + > hello <- function() { # + cat("Hello Worldn") + } > hello() # Hello World function() { } function() ( ) name > hello <- function(name) { + cat (" ", name, "n", sep="") + } > hello(" !") ! > add <- function (x, y) { + x + y + } > add(10, 5) [1] 15 add() x y add(10, 5) 10 5 2.2 > calc <- function (x, y) { + x * y + x - y + x + y # calc I 2
• 3. 2.3 6 + } > calc (3, 4) [1] 7 return() > calc <- function (x, y) { + x * y + x - y + return(x + y) # + } > calc (1, 2) [1] 3 return() 2 > calc <- function (x, y) { + x * y + return(x - y) # x-y + x + y # + } > calc (1, 2) [1] -1 2.3 hello() name " " hello() name " " > hello <- function(name=" ") { # name + cat (" ", name, "n", sep="") + } > hello() # name > hello(" !") # name ! ! name birthday I 3
• 4. 2.4 6 > greeting <- function(name, birthday, greet=" ", to=" ") { + str <- paste(to, " ", greet, " ", + " ", name, " ", + " ", birthday, " ", sep="") + str + } > greeting(" ", "4 1 ") # greet to [1] " 4 1 " str str R str str greeting() > greeting(" ", "4 1 ", " ") # to [1] " 4 1 " > greeting(" ", "4 1 ", " ", " ") [1] " 4 1 " greet 3 greet > greeting(" ", "4 1 ", " ") [1] " 4 1 " > greeting(" ", "4 1 ", to=" ") [1] " 4 1 " > greeting(greet=" ", name=" ", to=" ", birthday="4 1 ") [1] " 4 1 " 2.4 greeting() g g() greeting() I 4