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
TokyoR#84_Rexams
Search
nonki1974
April 04, 2020
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TokyoR#84_Rexams
nonki1974
April 04, 2020
More Decks by nonki1974
See All by nonki1974
GTFS with Tidytransit package
nonki1974
0
340
都道府県別焼き鳥屋ランキングの作成
nonki1974
1
920
Introduction to R
nonki1974
0
390
Introduction to dplyr
nonki1974
0
560
Introduction to ggplot2
nonki1974
1
540
Analyzing PSB tracks with R
nonki1974
0
620
introduction to fukuoka.R @ Fukuoka.LT
nonki1974
0
79
所要時間のヒートマップを作成する
nonki1974
0
590
gtfsr package @ fukuoka.R #11
nonki1974
0
360
Other Decks in Technology
See All in Technology
AIチャット検索改善の3週間
kworkdev
PRO
2
190
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
140
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
Lightning近況報告
kozy4324
0
220
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
秘密度ラベル初心者が第1歩でつまづかないための「設計・運用」ポイント
seafay
PRO
1
490
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
130
5分でわかるDuckDB Quack
chanyou0311
4
250
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
190
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
270
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
210
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Building Applications with DynamoDB
mza
96
7.1k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
190
The Limits of Empathy - UXLibs8
cassininazir
1
370
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
エンジニアに許された特別な時間の終わり
watany
107
250k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
240
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Facilitating Awesome Meetings
lara
57
7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
620
Transcript
オンラインテストの作成 with R/exams @nonki1974 Tokyo.R #84
こんにちは
moodle Learning Management System(LMS) スライド、レジュメの配布 アンケート、出欠確認、URL、ページ作成 小テスト
小テスト(計算問題の作成) {a}はワイルドカードデータセット → 出題のたびに値が変わる
小テスト(解答の設定)
小テスト(値生成ルール設定)
小テスト(プレビュー)
統計の授業で使ってみよう!
・・・・ 階乗や組み合わせの関数がない・・・!
Rで問題を作る:examsパッケージ
Rで問題を作る:examsパッケージ Rmarkdownで問題&解答を作成 Moodleにインポート Moodle XMLフォーマットに出力 1 2 3
フォーマット ```{r echo = FALSE, results='hide'} # 問題中のパラメータ設定など a <-
round(runif(1, 1, 10), 2) b <- round(runif(1, 1, 10), 2) res <- a + b ``` Question ======== 以下の値を求めなさい。 $$ `r a` + `r b` $$ Solution ======== 答えは $$ `r a` + `r b` = `r res` $$ Meta-information ================ extype: num exsolution: `r fmt(res)` exname: 足し算のテスト extol: 0.01
とりあえずの確認 library(exams) exams2html("add_ex.Rmd")
結果
Moodle XMLフォーマットに出力 # add_ex.xmlが生成される exams2moodle(file = "add_ex.Rmd", n = 10,
name = "add_ex")
Moodleにインポート → プレビュー
実戦投入 ```{r echo = FALSE, results = "hide"} lambda <-
sample(seq(0.1, 5, 0.1), 1) x <- ceiling(lambda) res <- c(dpois(x, lambda), 1-dpois(0, lambda)) ``` Question ======== ある店舗の1分間あたりの来客数$X$は,$¥lambda=`r lambda`$の ポアソン分布に従うと仮定する。このとき,以下の確率を求めな さい。 Answerlist ---------- * 1分間にちょうど`r x`人の来客がある確率 * 1分間に少なくとも1人以上の来客がある確率 Solution ======== 1分間にちょうど`r x`人の来客がある確率は, ¥begin{align} P(X = `r ceiling(x)`) &= ¥frac{`r lambda`^`r x`}{`r x`!}e^ {-`r lambda`} ¥¥ &= `r fmt(res[1])` ¥end{align} 1分間に少なくとも1人以上の来客がある確率は, ¥begin{align} P(X¥geqq 1) &= 1 - P(X = 0) ¥¥ &= 1 - e^{-`r lambda`} ¥¥ &= 1 - `r exp(-lambda)` ¥¥ &= `r fmt(res[2])` ¥end{align} となる. Answerlist ---------- * 1分間にちょうど`r x`人の来客がある確率は `r fmt(res[1])`. * 1分間に少なくとも1人以上の来客がある確率は `r fmt(res[2])`. Meta-information ================ extype: cloze exclozetype: num|num exsolution: `r fmt(res[1])`|`r fmt(res[2])` exname: poisson_ex_word extol: 0.01
こんな感じ
未解決 Windows環境では×(UTF-8保存でもダメ) 日本語PDFは×
Enjoy!