Microsoft Word - AEL CH12_彩色.doc

Similar documents
Microsoft PowerPoint _cp09_繪圖功能與文字.pptx


<4D F736F F D B0EABB79A4E5B8D5C344BBBCB065AAA9>


康體藝術

公共圖書館利用教育方案規劃之研究

目录 决策树 Adaptive Boosting (AdaBoost) Gradient Boost Decision Tree (GBDT) TreeBoost XGBoost 总结

Microsoft Word - 2B802內文.doc

東區校園中法治教育種子師資教學研習營

Microsoft Word - 1HF12序.doc

Microsoft Word - 讀報看科普─人體篇_橫_.doc

鍟嗗搧瑙傚療鈥㈤挗鏉

席 远 杨 一 人 了, 正 当 她 开 枪 时 却 发 现 子 弹 没 了 该 死, 只 能 赤 手 空 拳 了 洛 水 云 与 席 远 杨 交 起 手 来, 洛 水 云 出 手 招 招 致 命 想 那 席 远 杨 也 不 是 泛 泛 之 辈, 很 快 掌 握 了 洛 水 云 出 招 路 数 看

閱 讀 素 材 V.S 分 組 方 式 的 差 異 化 教 學 工 具 表 班 級 :( ) 閱 讀 素 材 V.S 分 組 方 式 獨 立 閱 讀 夥 伴 閱 讀 ( 同 質 性 ) 夥 伴 閱 讀 ( 異 質 性 ) 友 善 陪 伴 虛 心 受 教 國 語 日 報 新 聞 生 活 文 藝 兒 童

(Microsoft Word - \244g\246a\247B\244\275\253H\245\365\244\247\275\325\254d\254\343\250s doc)

Microsoft Word - p11.doc

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4

王卫杰-R会议

零基础掌握 R 语言

Sichuan Journal of Zoology Vol123 No , ; (mm) : , (4113) > (3917) >, (3713) > (3011) > (2314) >, (918), 3107,, 113 ( Head) ( Tai

yy.xls

人体解剖实习指导.doc


穨finaldiss.doc

13. 下 列 植 物 的 向 性 或 運 動, 哪 些 是 受 到 生 長 素 作 用 的 影 響?(5-4) 甲. 睡 蓮 的 花 到 了 晚 上 會 合 起 來 ; 乙. 黃 瓜 的 捲 鬚 攀 附 竹 竿 向 上 生 長 ; 丙. 含 羞 草 的 葉 經 碰 觸 後 閉 合 ; 丁. 紅 豆


第十二章 角色转换 走向成功

16 标 本 缓 急 的 护 理 原 则 不 包 括 ( 扶 正 祛 邪 法 ) 17 顺 从 疾 病 假 象 而 进 行 护 理 的 方 法 为 ( 反 护 法 ) 18 下 列 属 于 正 护 法 的 是 ( 虚 则 补 之 ) 19 因 中 气 不 足 脾 阳 不 运 而 致 的 腹 胀 便

???p???????????i?h?h?D???N_?s_

國立和美實驗學校103學年度第1次教師甄選簡章

104 年 度 推 廣 校 園 正 確 用 藥 教 育 模 式 中 心 學 校 成 果 報 告 書 學 校 : 桃 園 市 中 心 學 校 田 心 國 民 小 學 壹 計 畫 目 的 一 凝 聚 本 市 中 心 學 校 與 重 點 種 子 學 校 正 確 用 藥 教 育 推 廣 共 識, 期 能 培

( ) 5. 自 行 車 有 吱 吱 喳 喳 的 聲 音 可 能 是 什 麼 原 因 所 造 成?(1) 鈴 號 的 聲 音 (2) 螺 栓 ( 帽 ) 鬆 動 (3) 腳 踏 板 磨 損 ( ) 6. 下 列 敘 述 何 者 是 對 的?(1) 輪 胎 的 胎 壓 是 愈 高 愈 好, 所 以 填

硕士论文正文

ZW.PDF

cm 50.5cm

3. 透 過 團 體 小 組 分 別 設 計 出 一 套 自 行 車 伸 展 操 4. 教 師 介 紹 騎 乘 自 行 車 上 座 方 法 煞 車 及 踩 踏 等 要 領. 練 習 自 行 車 運 動 中 基 本 的 上 座 平 衡 直 行 轉 彎 煞 車 等 動 作 ( 二 ) 自 行 車 運 動

学做一体手册,餐饮.doc

外科手术基础概述

untitled

Microsoft PowerPoint - Sens-Tech WCNDT [兼容模式]

分析物種A及B在管柱中的分離效 果由選擇因子決定 3. Selectivity factor (α)(relative retention)--選擇因子(相對滯留率) α =KB/KA KB KA α 1 KB大 為 樣品愈慢出來 KA小 為 樣品愈快出來 α大表示選擇性高 4.Number of

SHIMPO_表1-表4

Microsoft PowerPoint - 01國家考試講座簡報--中興大學簡報

840 提示 Excel - Excel -- Excel (=) Excel ch0.xlsx H5 =D5+E5+F5+G5 (=) = - Excel 00

大漠 伪前端, 就职于淘宝

6寸PDF生成工具

Microsoft PowerPoint - A02-hmwu_R-Object.pptx

投稿類別:其他類

3.1 num = 3 ch = 'C' 2

QR Code 技術之探討

目 录 第 一 部 分 2015 年 毕 业 生 就 业 状 况... 1 一 毕 业 生 总 规 模... 1 二 就 业 率 和 就 业 结 构... 1 ( 一 ) 就 业 率 与 毕 业 去 向... 1 ( 二 ) 出 国 ( 境 ) 深 造... 3 ( 三 ) 就 业 单 位 性 质

Page 2 of 32 Pages Luminous Intensity Distribution Curve

架 支 持 情 境 模 擬 等, 掌 握 這 些 功 能 並 結 合 教 目 標, 就 能 設 計 出 有 助 於 生 習 的 教 遊 戲 本 文 以 下 分 析 並 列 舉 可 以 發 揮 這 些 功 能 的 典 型 案 例 一 提 高 習 興 趣 眾 所 周 知, 遊 戲 一 定 帶 有 趣 味

跨 境 犯 罪 案 例 報 告 擄 人 勒 贖 案 件 檢 座 約 晚 上 12 點 半 在 辦 公 室 可 以 嗎? 24 日 清 晨 見 過 證 據 資 料 後, 同 意 緊 急 上 線, 並 立 即 製 作 聲 請 書, 並 獲 得 法 院 准 許, 此 後 一 路 積 極 續 線 及 擴 線

5. 閱 讀 下 文, 推 斷 內 最 適 合 填 入 的 詞 語 依 序 為 何? 人 也 真 是 一 個 絕 字, 一 邊 向 左, 一 邊 向 右, 一 副 的 樣 子, 偏 又 相 連 著, 各 說 各 話 各 走 各 路, 卻 又 人, 這 麼 一 個 簡 單 的 字, 竟 包 含 如 此

涓浗鏂囧寲

「人名權威檔」資料庫欄位建置表

中华人民共和国水利行业标准(封面).doc

玉田國小100學年度上學期品德教育月主題

三 紀 錄 課 堂 上 可 見 的 學 習 情 況, 無 法 紀 錄 學 生 個 別 的 學 習 歷 程 四 教 師 無 彈 性 的 不 變 的 教 學 時 間 五 以 課 本 及 課 程 指 引 作 為 教 學 的 主 要 依 據 六 教 師 主 導 學 生 的 學 習 行 為 由 教 師 解 決

C 1

SHIMPO_表1-表4

untitled

Gerotor Motors Series Dimensions A,B C T L L G1/2 M G1/ A 4 C H4 E

Page of 1 Pages Luminous Intensity Distribution Curve

Settlement Equation " H = CrH 1+ e o log p' o + ( p' p' c o! p' o ) CcH + 1+ e o log p' c + p' f! ( p' p' c c! p' o ) where ΔH = consolidation settlem

ebook73-29

光绪帝

untitled

( Version 0.4 ) 1

3. 反 映 : 4. 五 花 八 门 : 5. 慷 慨 : 6. 参 与 : 7. 慰 劳 : 8. 延 续 : 9. 珍 爱 : 10. 浪 漫 : 三. 找 出 下 列 每 组 词 中 的 近 义 词 或 同 义 词 : 节 日 节 气 节 令 时 节 习 俗 民 俗 仪 式 风 俗 文 献

投影片 1

基于因子分析法对沪深农业类上市公司财务绩效实证分析

MODEL COLOR LIST UZ125D2 YMW GRAY YNF RED YRG BLUE 30H WHITE

奇特的一生(Эта странная жизнь)

优势学科公共卫生与预防医学任务书上传版.DOC

接线端子--Connectors规格书.doc

Page 2 of 19 Pages Luminous Intensity Distribution Curve

Page 2 of 19 Pages Luminous Intensity Distribution Curve

Page 2 of 19 Pages Luminous Intensity Distribution Curve

Page 2 of 19 Pages Luminous Intensity Distribution Curve

Page 2 of 19 Pages Luminous Intensity Distribution Curve

coverage2.ppt

杭州创惠仪器有限公司 Page 2 of 19 Pages Luminous Intensity Distribution Curve

杭州创惠仪器有限公司 Page 2 of 19 Pages Luminous Intensity Distribution Curve

Chapter 9: Objects and Classes

四、實務實習課程之實習工作日誌(請貼上掃描檔)

簡報技巧

Gerolor Motors Series Dimensions A,B C T L L G1/2 M8 G1/ A 4 C H4 E

IsPostBack 2

总 第 37 期 / 2015 年 2 月 车 厂 资 讯 一 汽 与 工 信 部 电 子 五 所 签 署 战 略 合 作 框 架 协 议 1 月 29 日, 中 国 第 一 汽 车 股 份 有 限 公 司 与 工 业 和 信 息 化 部 电 子 第 五 研 究 所 战 略 合 作 签 约 仪 式

第 二 章 校 草 出 现 圣 迪 亚 学 院, 一 所 远 近 闻 名 的 贵 族 学 院 它 的 知 名 度 就 好 像 猪 的 知 名 度 一 样, 无 人 不 知 无 人 不 晓 是 所 有 人 都 向 往 的 学 校 圣 迪 亚 学 院 是 以 欧 式 建 筑 风 格 为 主 的 大 门

Microsoft Word - 21??¡N??`?C?~??-1.doc, page Normalize ( Microsoft Word - 21ºÝ¤È¸`§C¦~¯Å-1.doc )

######## First set of commands x <- 0.5; y <- 0 if (x>3) y <- 1 else y <- 2 ######## Second set of commands x <- 0.5; y <- 0 if (x>3) y <- 1 else ###


講 綱 一 職 涯 規 劃 決 定 自 己 的 人 生 二 認 識 國 家 考 試 三 年 新 制 措 施 四 報 考 類 科 如 何 決 定 五 如 何 準 備 國 家 考 試 六 嶺 東 科 大 輝 煌 成 果 七 參 加 國 家 考 試 程 序 八 考 試 資 訊 如 何 取

SMD POWER INDUCTORS BS CDSU SERIES Test Freq. : BS0302CDSU BS0403CDSU BS0502CDSU BS0503CDSU BS0504CDSU BS0703CDSU BS0705CDSU BS1004CDSU BS1005CDSU 1.0

【结构化面试名师精品班2ATY15K002】讲义.docx

Technical Acoustics Vol.27, No.4 Aug., 2008,,, (, ) :,,,,,, : ; ; : TB535;U : A : (2008) Noise and vibr

Air Core Coil Inductors

Transcription:

L e s s o n

R R Exploratory Data Analysis EDA R 12-1 Data Frame nrow() ncol() dim() > nrow(iris) # iris [1] 150 > ncol(iris) # iris [1] 5 > dim(iris) # iris [1] 150 5 nrow() number of rows ncol() number of columns dim() dimensions head() tail() names() 12-2

12 > head(iris) # iris Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa 4 4.6 3.1 1.5 0.2 setosa 5 5.0 3.6 1.4 0.2 setosa 6 5.4 3.9 1.7 0.4 setosa > tail(iris) # iris Sepal.Length Sepal.Width Petal.Length Petal.Width Species 145 6.7 3.3 5.7 2.5 virginica 146 6.7 3.0 5.2 2.3 virginica 147 6.3 2.5 5.0 1.9 virginica 148 6.5 3.0 5.2 2.0 virginica 149 6.2 3.4 5.4 2.3 virginica 150 5.9 3.0 5.1 1.8 virginica > names(iris) # iris [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" summary() > summary(iris) # iris 12-1 summary(iris) 12-3

R str() str() str() structure > str(iris) 12-2 str(iris) 12-2 Base Plotting System R hist() hist(rnorm(1000)) boxplot() boxplot(sepal.length ~ Species, data = iris) plot(..., type = "l") plot(airpassengers, type = "l") plot() plot(cars) barplot() barplot(table(mtcars$cyl)) curve() curve(sin, from = 0, to = pi * 2) 12-4

12 hist() hist() histogram >hist(rnorm(1000)) 12-3 hist(rnorm(1000)) rnorm() 0 1 1000 boxplot() iris Species Sepal.Length > boxplot(sepal.length ~ Species, data = iris) 12-5

R 12-4 boxplot(sepal.length ~ Species, data = iris) plot(..., type = "l") > x <- seq(from = as.date("2017-01-01"), to = as.date("2017-01-31"), by = 1) > set.seed(123) # y > y <- sample(1:100, size = 31, replace = TRUE) > plot(x, y, type = "l") 12-5 plot(x, y, type = l ) 12-6

12 x 2017 1 31 1 100 31 y type = "l" line set.seed() sample() y 123 sample() set.seed(123) y R AirPassengers LakeHuron ts time series plot() type = "l" > class(airpassengers) [1] "ts" > class(lakehuron) [1] "ts" > plot(airpassengers) > plot(lakehuron) 12-6 plot(airpassengers) 12-7

R 12-7 plot(lakehuron) plot() > plot(cars$speed, cars$dist) 12-8 lot(carsspeed,carsdist) 12-8

12 plot() scatter matrix > plot(iris) 12-9 plot(carsspeed,carsdist) barplot() ice_cream_flavor 100 程式碼 12-1 > ice_cream_flavor <- rep(na, times = 100) > for (i in 1:100){ + ice_cream_flavor[i] <- sample(c("vanilla", "chocolate", "matcha", "other"), size = 1) + } > ice_cream_flavor 12-9

輕鬆學習 R 語言 圖 12-10 ice_cream_flavor 的輸出 在這個眼花撩亂的 ice_cream_flavor 向量中 該如何很快地得知這 100 個 人最愛口味的分佈呢 可以使用 table() 函數 它的作用就像是樞紐分析 可以幫我們把凌亂的資 料統整起來 程式碼 12-2 > ice_cream_flavor <- rep(na, times = 100) > for (i in 1:100){ + ice_cream_flavor[i] <- sample(c("vanilla", "chocolate", "matcha", "other"), size = 1) + } > table(ice_cream_flavor) ice_cream_flavor chocolate matcha other vanilla 32 20 25 23 我們可以一目瞭然 有 32 個人最喜歡的口味是巧克力 20 個人最喜歡抹 茶 25 個人喜歡其他的口味 而有 23 個人最喜歡香草 這時就可以使用 barplot() 函數將這個清晰的結果繪畫成清楚的長條圖 12-10

12 程式碼 12-3 > ice_cream_flavor <- rep(na, times = 100) > for (i in 1:100){ + ice_cream_flavor[i] <- sample(c("vanilla", "chocolate", "matcha", "other"), size = 1) + } > barplot(table(ice_cream_flavor)) 12-11 barplot(table(ice_cream_flavor)) curve() from to sin() > curve(sin, from = -pi, to = pi) 12-11

R 12-12 curve(sin, from = -pi, to = pi) 2 my_sqr() y f ( x) x -3 3 > my_sqr <- function(x){ + return(x^2) + } > curve(my_sqr, from = -3, to = 3) 12-13 curve(my_sqr, from = -3, to = 3) 12-12

12 自訂標題 X 軸標籤與 Y 軸標籤 main xlab ylab > plot(cars, main = "Car speed vs. braking distance", xlab = "Car speed (mph)", ylab = "Braking distance(ft)") 12-14 加入格線 grid() X Y > plot(cars, main = "Car speed vs. braking distance", xlab = "Car speed (mph)", ylab = "Braking distance(ft)") > grid() 12-13

R 12-15 調整圖形為水平方向 horiz = TRUE > ice_cream_flavor <- rep(na, times = 100) > for (i in 1:100){ + ice_cream_flavor[i] <- sample(c("vanilla", "chocolate", "matcha", "other"), size = 1) + } > barplot(table(ice_cream_flavor), horiz = TRUE) 12-16 12-14

12 調整刻度顯示方向 las = 1 > ice_cream_flavor <- rep(na, times = 100) > for (i in 1:100){ + ice_cream_flavor[i] <- sample(c("vanilla", "chocolate", "matcha", "other"), size = 1) + } > barplot(table(ice_cream_flavor), horiz = TRUE, las = 1) 12-17 調整刻度文字大小 chocolate cex.name Y > barplot(table(ice_cream_flavor), horiz = TRUE, las = 1, cex.name = 0.8) 12-18 cex.name 12-15

R X cex.axis > barplot(table(ice_cream_flavor), horiz = TRUE, las = 1, cex.name = 0.8, cex.axis = 1.2) 12-19 cex.axis cex character expansion factor 1 在直方圖上加上密度曲線 density() lines() freq = FALSE > norm_dist <- rnorm(1000) > hist(norm_dist, freq = FALSE) > lines(density(norm_dist)) 12-16

12 12-20 調整資料點的形狀與顏色 pch col pch plotting character col color > plot(cars, pch = 2, col = "red") # 12-21 12-17

R > iris_pch <- c(1, 2, 3)[as.numeric(iris$Species)] > plot(iris$sepal.length, iris$sepal.width, col = iris$species, pch = iris_pch) 12-22 2 pch col Graphical Parameters 繪畫多個圖形 par(mfrow = c(m, n)) mxn mfrow matrix of figures entered row-wise 程式碼 12-4 > par(mfrow = c(2, 2)) > boxplot(iris$sepal.length ~ iris$species, main = "Sepal length by species") > boxplot(iris$sepal.width ~ iris$species, main = "Sepal width by species") > boxplot(iris$petal.length ~ iris$species, main = "Petal length by species") > boxplot(iris$petal.width ~ iris$species, main = "Petal width by species") 12-18

12 12-23 RStudio Plots Export 12-24 12-19

R 12-25 2 Base Plotting System Google StackOverflow 12-20

R Base Plotting System 2X2 Base Plotting System R Graphics Cookbook http://shop.oreilly.com/product/0636920023135.do Graphical Parameters http://www.statmethods.net/advgraphs/parameters.html 12-21