Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TokyoR109.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
kilometer
October 07, 2023
Programming
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TokyoR109.pdf
第109回Tokyo.Rでトークした際のスライド資料です。
kilometer
October 07, 2023
More Decks by kilometer
See All by kilometer
TokyoR#111_ANOVA
kilometer
2
1k
TokyoR#108_NestedDataHandling
kilometer
0
940
TokyoR#107_R_GeoData
kilometer
0
540
SappoRo.R_roundrobin
kilometer
0
210
TokyoR#104_DataProcessing
kilometer
1
800
TokyoR#103_DataProcessing
kilometer
0
1k
TokyoR#102_RMarkdown
kilometer
1
740
TokyoR#101_RegressionAnalysis
kilometer
0
580
TokyoR#99_Divergence
kilometer
1
490
Other Decks in Programming
See All in Programming
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Webの地図
yosuke_furukawa
PRO
6
4.3k
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
170
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
6.5k
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
300
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
140
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
240
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
Family mrubyの進捗
kishima
1
110
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
6
1.7k
Featured
See All Featured
Design in an AI World
tapps
1
310
Making Projects Easy
brettharned
120
6.7k
The Limits of Empathy - UXLibs8
cassininazir
1
660
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Speed Design
sergeychernyshev
33
2.1k
A Soul's Torment
seathinner
7
3.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Designing for humans not robots
tammielis
254
26k
How GitHub (no longer) Works
holman
316
150k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
Transcript
#109 @kilometer00 2023.10.07 Data Visualization in R
Who!? Who?
Who!? ・ @kilometer ・特任教員 (Ph.D. Eng.) ・神経科学 ・⾏動計算論 ・データ可視化 ・R:
~ 15 years ・近況:「鵼」読了。
None
宣伝!!(書籍の翻訳に参加しました。) 絶賛販売中! (ジャン献本に1冊どうぞ)
宣伝!! (医療健康データ科学研究ネットワークの加盟者向け) 先⾏受付 開始しました!!
@kilometer00 Data Visualization in R
None
IEEE Spectrum’s Top Programming Languages 2022 https://spectrum.ieee.org/top-programming-languages-2022
https://spectrum.ieee.org/top-programming-languages-methods
https://spectrum.ieee.org/top-programming-languages-methods
None
TIOBE Index for July 2023 https://www.tiobe.com/tiobe-index/
https://www.tiobe.com/tiobe-index/
https://twitter.com/hadleywickham/status/1279405379449913344?s=20
https://gist.github.com/daroczig/ Number of R packages ever published on CRAN
https://cran.r-project.org/web/packages/ The Comprehensive R Archive Network (CRAN)
h"ps://www.datasciencemeta.com/rpackages
h"ps://www.datasciencemeta.com/rpackages
Rを始めよう Rの基礎知識 データ可視化の基礎 □ □ □
の始め⽅ 1. Rをインストール 2. RStudioをインストール https://www.r-project.org/ https://posit.co/download/rstudio-desktop/
の始め⽅ 3. RStudioを⽴ち上げる 4. 新規プロジェクトを作る 6. tidyverseをインストール install.packages("tidyverse") 5. 新規スクリプトを開く
File -> New Project... ⌘ ⇧ N
① ここにRのコードを書く ② 選択して実⾏(⌘↩) ③ 実⾏結果が表⽰ スクリプト → 名前をつけて保存 コンソール
RStudioの操作
① ここにRのコードを書く ② 選択して実⾏(⌘↩) ③ 実⾏結果が表⽰ スクリプト → 名前をつけて保存 コンソール
環境変数などが表⽰ ファイル/プロット/ヘルプなど ⾃動で反映 RStudioの操作
の基本
例えばExcelでは、 セルの内部に関数を書いて 結果だけを表⽰する
例えばExcelでは、 セルの内部に関数を書いて 結果だけを表⽰する どこまでが共通の属性なのか 直感的な配置から読み取る
の基本 a <- 5 x <- 1:5 y <- a
* x 代⼊演算⼦ オブジェクト コード
選択して実⾏(⌘↩) ⾃動で反映 実⾏内容 書く
の基本 Q. オブジェクトの中⾝が⾒たい時はどうするの? A. オブジェクト名だけを選択して実⾏します。
実⾏(⌘↩)
の基本 Q. オブジェクトの中⾝が⾒たい時はどうするの? A. オブジェクト名だけを選択して実⾏します。 Q. 既にある表データをRに読み込みたいんですが? A. read_csv()関数を使います。
の基本 path <- "data/Book1.csv" read_csv(path)
実⾏(⌘↩) エラー:そんな関数ないよ
の基本 CRAN The Comprehensive R Archive Network packages
install.packages("tidyverse") の基本 1. パッケージのインストール 2. インストールされたパッケージを使う library(tidyverse)
実⾏(⌘↩) 読み込めたけど... コレとコレ は省きたい (データじゃない)
の基本 library(tidyverse) path <- "data/Book1.csv" read_csv(path, skip = 2)
None
いちいちcsvに出⼒するの⾯倒だから エクセルファイルのまま読み込みたいなぁ。
library(tidyverse) path <- "data/Book1.xls" read_xlsx(path, skip = 2) の基本
エラー:そんな関数ないよ
library(tidyverse) library(readxl) path <- "data/Book1.xls" read_xlsx(path, skip = 2) の基本
そんな名前のファイル無いよ
無いことないだろ!!!?? さっき作ったばっかりだぞ!!
無いことないだろ!!!?? さっき作ったばっかりだぞ!! ほら!!!!!!
無いことないだろ!!!?? さっき作ったばっかりだぞ!! ほら!!!!!! 😇 ほら...ぁ...
library(tidyverse) library(readxl) path <- "data/Book1.xlsx" read_xlsx(path, skip = 2) の基本
😇 できた
プログラムは思った通りには動かない。 書いた通りに動くのだ。 誰が⾔ったか知らないが、
の始め⽅ おすすめパッケージ達 ・ tidyverse (データ科学総合ツール) ・ data.table (大きいデータ取り扱うなら) ・ cmdstanr
(ベイズ統計やるなら) ・ patchwork (データ可視化やるなら) 最初から全部いれる必要はないよ!
基礎知識1 data.frame
ベクトル (vector) x <- c(5:10) ## x ## [1] 5
6 7 8 9 10 ## ## x[3] ## [1] 7 ## ## x[c(2, 5, 1)] ## [1] 6 9 5
リスト (list) list( c(1:3), letters[1:3], seq(3, 5, by = 1))
## [[1]] ## [1] 1 2 3 ## ## [[2]] ## [1] "a" "b" "c" ## ## [[3]] ## [1] 3 4 5
名前付きリスト (named list) list( x = c(1:3), y = letters[1:3],
z = seq(3, 5, by = 1)) ## $x ## [1] 1 2 3 ## ## $y ## [1] "a" "b" "c" ## ## $z ## [1] 3 4 5
データフレーム (data.frame) data.frame( x = c(1:3), y = letters[1:3], z
= seq(3, 5, by = 1)) ## x y z ## 1 1 a 3 ## 2 2 b 4 ## 3 3 c 5
data.frame( x = c(1:3), y = letters[1:3], z = seq(3,
5, by = 1)) ## x y z ## 1 1 a 3 ## 2 2 b 4 ## 3 3 c 5 observa(on variable データフレーム (data.frame)
パイプ演算⼦ 基礎知識2 (今⽇の発表では登場しないけどね!)
1JQFBMHFCSB X %>% f X %>% f(y) X %>% f
%>% g X %>% f(y, .) f(X) f(X, y) g(f(X)) f(y, X) %>% {magri(r} 「dplyr再⼊⾨(基本編)」yutanihila8on h"ps://speakerdeck.com/yutannihila6on/dplyrzai-ru-men-ji-ben-bian
縦横データの変換 基礎知識3 (後で出てくるよ!)
横⻑データ (wide format data) .cols <- c("name", "height", "mass", "birth_year")
dat_wide <- starwars[1:4, .cols] ## > dat_wide ## # A tibble: 4 × 4 ## name height mass birth_year ## <chr> <int> <dbl> <dbl> ## 1 Luke Skywalker 172 77 19 ## 2 C-3PO 167 75 112 ## 3 R2-D2 96 32 33 ## 4 Darth Vader 202 136 41.9
縦⻑データ (long format data) ## > dat_long ## # A
tibble: 12 × 3 ## name parameter value ## <chr> <chr> <dbl> ## 1 Luke Skywalker height 172 ## 2 Luke Skywalker mass 77 ## 3 Luke Skywalker birth_year 19 ## 4 C-3PO height 167 ## 5 C-3PO mass 75 ## 6 C-3PO birth_year 112 ## 7 R2-D2 height 96 ## 8 R2-D2 mass 32 ## 9 R2-D2 birth_year 33 ## 10 Darth Vader height 202 ## 11 Darth Vader mass 136 ## 12 Darth Vader birth_year 41.9
横⻑→縦⻑データ (wide → long) tidyr::pivot_longer( data = dat_wide, cols =
!name, names_to = "parameter", values_to = "value" ) 縦⻑→横⻑データ (long → wide) tidyr::pivot_wider( data = dat_long, names_from = "parameter", values_from = "value" )
Rを始めよう Rの基礎知識 データ可視化の基礎 □ □ □ ✔ ✔
@上野の森美術館 2023.05.31-07.22 特別展:恐⻯図鑑 失われた世界の想像/創造 h"ps://kyoryu-zukan.jp
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
“アンモナイト類の復元画と分類学的⻫⼀説の挑戦” 現在は過去を説明する鍵であるという考え⽅ (C. Lyell, “Principles of Geology”, 1830) Allmon WD.,
Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
福井県⽴恐⻯博物館恐⻯・古⽣物 Q&A > アンモナイトって何のなかま? https://www.dinosaur.pref.fukui.jp/dino/faq/r02085.html
アオイガイ (Argonauta argo) メスでは2本の腕が特殊な形状に発達し、 そこからの分泌物で卵を保育する⾙殻を 形成する。 https://丹後.com from Wikipedia JP,
Public Domain
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1
Allmon WD., Earth Sciences History 36(1):1-29 (2017), DOI:10.17704/1944-6178-36.1.1 オウムガイ from
Wikipedia JP CC BY-SA 2.5 DEED
Suture paIern formaKon in ammonites and the unknown rear mantle
structure Inoue, S., Konodo, S., ScienKfic Reports, (6) 33689 (2016), DOI: 10.1038/srep33689.
Suture paIern formaKon in ammonites and the unknown rear mantle
structure Inoue, S., Konodo, S., ScienKfic Reports, (6) 33689 (2016), DOI: 10.1038/srep33689. マダコ from Wikipedia JP CC BY-SA 3.0 DEED
؍ͷ༗ແʹΑΒͣଘࡏ͍ͯ͠Δ ͷͦͷͷ ࣮ଘ ใ ࣮ଘΛූ߸Խͨ͠ද ਤ ओͱͯ͠ୡΛతͱͨ͠ ใͷࢹ֮తද ؍ʢࣸ૾ʣ ՄࢹԽʢࣸ૾ʣ
࣮ଘ ਤ ࣸ૾ʢ؍ʣ ใ ࣸ૾ʢՄࢹԽʣ
集合𝑋 集合𝑌 要素𝑥 要素𝑦 写像 𝑓: 𝑋 → 𝑌もしくは𝑓: 𝑥
⟼ 𝑦 (始集合・定義域) (終集合・終域) 【写像】 ある集合の要素を他の集合のただ1つの要素に 対応づける規則
ࣸ૾ Ϧϯΰ ʢ࣮ଘʣ Ϧϯΰ ʢσʔλʣ mapping
Ϧϯΰ ࣸ૾ ϑϧʔπ ৭ ը૾ ࣮ଘ σʔλ νϟωϧ mapping
channel
地図空間 ⽣物種名空間 名空間 ⾦銭価値空間 (円) ⾦銭価値空間 (ドル) コーヒー ¥290 $2.53
[緯度, 経度] Homo sapiens 実存 写像 写像 写像 写像 写像 写像 情報 【写像】 ある集合の要素を他の集合のただ1つの要素に対応づける規則
࣮ଘ ਤ ࣸ૾ʢ؍ʣ ใ ࣸ૾ʢՄࢹԽʣ
࣮ଘ ࣸ૾ʢ؍ʣ σʔλ ࣸ૾ʢσʔλՄࢹԽʣ άϥϑ 𝑋 𝑌 𝑦! 𝑥! 𝑦"
𝑥" 𝑋 𝑌 𝑥! 𝑥" 𝑦! 𝑦" EBUB mapping σʔλՄࢹԽ
𝑋 𝑌 𝑦! 𝑥! 𝑦" 𝑥" 𝑋 𝑌 𝑥! 𝑥"
𝑦! 𝑦" σʔλՄࢹԽ ࣸ૾ mapping x axis, y axis, color, fill, shape, linetype, alpha… aesthetic channels ৹ඒతνϟωϧ
𝑋 𝑌 𝑦! 𝑥! 𝑦" 𝑥" 𝑋 𝑌 𝑥! 𝑥"
𝑦! 𝑦" σʔλՄࢹԽ ࣸ૾ mapping x axis, y axis, color, fill, shape, linetype, alpha… aesthetic channels ৹ඒతνϟωϧ ggplot(data = my_data) + aes(x = X, y = Y)) + goem_point() HHQMPUʹΑΔ࡞ਤ
初めてのggplot2 dat <- data.frame( tag = rep(c("a", "b"), each =
2), X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2) ) ggplot2::ggplot() + ggplot2::geom_point( data = dat, mapping = ggplot2::aes(x = X, y = Y) )
初めてのggplot2 dat <- data.frame( tag = rep(c("a", "b"), each =
2), X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2) ) ggplot2::ggplot() + ggplot2::geom_point( data = dat, mapping = ggplot2::aes(x = X, y = Y) ) ඳը։࢝Λએݴ ه߸Ͱͭͳ͙ 様々な審美的チャネル(aesthetic channels)を指定できる
library(tidyverse) dat <- data.frame(tag = rep(c("a", "b"), each = 2),
X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2)) ggplot() + geom_point(data = dat, mapping = aes(x = X, y = Y)) + geom_path(data = dat, mapping = aes(x = X, y = Y)) ॳΊ͔ͯΒ൪ͷHHQMPU
ॳΊ͔ͯΒ൪ͷHHQMPU
HHQMPUίʔυͷॻ͖ํͷ৭ʑ ggplot() + geom_point(data = dat, mapping = aes(x =
X, y = Y)) + geom_path(data = dat, mapping = aes(x = X, y = Y)) ggplot(data = dat, mapping = aes(x = X, y = Y)) + geom_point() + geom_path() ggplot(data = dat) + aes(x = X, y = Y) + geom_point() + geom_path() ڞ௨ͷࢦఆΛHHQMPU ؔͷதͰߦ͍ɺҎԼলུ͢Δ͜ͱ͕Մೳ NBQQJOHͷใ͕ॻ͔ΕͨBFT ؔΛHHQMPU ؔͷ֎ʹஔ͘͜ͱͰ͖Δ
HHQMPUίʔυͷॻ͖ํͷ৭ʑ ggplot() + geom_point(data = dat, mapping = aes(x =
X, y = Y, color = tag)) + geom_path(data = dat, mapping = aes(x = X, y = Y)) ggplot(data = dat) + aes(x = X, y = Y) + # 括り出すのは共通するものだけ geom_point(mapping = aes(color = tag)) + geom_path() ϙΠϯτͷ৭ͷNBQQJOHΛࢦఆ
HHQMPUίʔυͷॻ͖ํͷ৭ʑ ggplot(data = dat) + aes(x = X, y =
Y) + geom_point(aes(color = tag)) + geom_path() ggplot(data = dat) + aes(x = X, y = Y) + geom_path() + geom_point(aes(color = tag)) ͋ͱ͔Β ͰॏͶͨཁૉ͕લ໘ʹඳը͞ΕΔ
library(tidyverse) dat <- data.frame(tag = rep(c("a", "b"), each = 2),
X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2)) g <- ggplot(data = dat) + aes(x = X, y = Y) + geom_path() + geom_point(mapping = aes(color = tag)) HHQMPUը૾ͷอଘ ggsave(filename = "fig/demo01.png", plot = g, width = 4, height = 3, dpi = 150)
library(tidyverse) dat <- data.frame(tag = rep(c("a", "b"), each = 2),
X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2)) g <- ggplot(data = dat) + aes(x = X, y = Y) + geom_path() + geom_point(mapping = aes(color = tag)) HHQMPUը૾ͷอଘ ggsave(filename = "fig/demo01.png", plot = g, width = 4, height = 3, dpi = 150) αΠζσϑΥϧτͰΠϯν୯ҐͰࢦఆ
library(tidyverse) dat <- data.frame(tag = rep(c("a", "b"), each = 2),
X = c(1, 3, 5, 7), Y = c(3, 9, 4, 2)) g <- ggplot(data = dat) + aes(x = X, y = Y) + geom_path() + geom_point(mapping = aes(color = tag)) HHQMPUը૾ͷอଘ ggsave(filename = "fig/demo01.png", plot = g, width = 10, height = 7.5, dpi = 150, units = "cm") # "cm", "mm", "in"を指定可能
HFNP@ ؔ܈ DGIUUQTXXXSTUVEJPDPNSFTPVSDFTDIFBUTIFFUT
ෳͷܥྻΛඳը͢Δ > head(anscombe) x1 x2 x3 x4 y1 y2 y3
y4 1 10 10 10 8 8.04 9.14 7.46 6.58 2 8 8 8 8 6.95 8.14 6.77 5.76 3 13 13 13 8 7.58 8.74 12.74 7.71 4 9 9 9 8 8.81 8.77 7.11 8.84 5 11 11 11 8 8.33 9.26 7.81 8.47 6 14 14 14 8 9.96 8.10 8.84 7.04 ggplot(data = anscombe) + geom_point(aes(x = x1, y = y1)) + geom_point(aes(x = x2, y = y2), color = "Red") + geom_point(aes(x = x3, y = y3), color = "Blue") + geom_point(aes(x = x4, y = y4), color = "Green") ͜Ε·ͰͷࣝͰؤுΔͱ͜͏ͳΔ
HHQMPUʹΑΔσʔλՄࢹԽ ࣮ଘ ࣸ૾ʢ؍ʣ σʔλ ࣸ૾ʢσʔλՄࢹԽʣ άϥϑ 𝑋 𝑌 𝑦! 𝑥!
𝑦" 𝑥" SBXEBUB 写像 aesthetic channels ৹ඒతνϟωϧ ՄࢹԽʹదͨ͠EBUBܗࣜ 変形 ਤͷͭͷ৹ඒతνϟωϧ͕ σʔλͷͭͷมʹରԠ͍ͯ͠Δ
> head(anscombe) x1 x2 x3 x4 y1 y2 y3 y4
1 10 10 10 8 8.04 9.14 7.46 6.58 2 8 8 8 8 6.95 8.14 6.77 5.76 3 13 13 13 8 7.58 8.74 12.74 7.71 4 9 9 9 8 8.81 8.77 7.11 8.84 5 11 11 11 8 8.33 9.26 7.81 8.47 6 14 14 14 8 9.96 8.10 8.84 7.04 > head(anscombe_long) key x y 1 1 10 8.04 2 2 10 9.14 3 3 10 7.46 4 4 8 6.58 5 1 8 6.95 6 2 8 8.14 ggplot(data = anscombe_long) + aes(x = x, y = y, color = key) + geom_point() ৹ඒతνϟωϧ Y࣠ Z࣠ ৭ ʹରԠ͢ΔมʹͳΔΑ͏มܗ ݟ௨͠ྑ͘γϯϓϧʹՄࢹԽͰ͖Δ
> head(anscombe) x1 x2 x3 x4 y1 y2 y3 y4
1 10 10 10 8 8.04 9.14 7.46 6.58 2 8 8 8 8 6.95 8.14 6.77 5.76 3 13 13 13 8 7.58 8.74 12.74 7.71 4 9 9 9 8 8.81 8.77 7.11 8.84 5 11 11 11 8 8.33 9.26 7.81 8.47 6 14 14 14 8 9.96 8.10 8.84 7.04 > head(anscombe_long) key x y 1 1 10 8.04 2 2 10 9.14 3 3 10 7.46 4 4 8 6.58 5 1 8 6.95 6 2 8 8.14 ৹ඒతνϟωϧ Y࣠ Z࣠ ৭ ʹରԠ͢ΔมʹͳΔΑ͏มܗ anscombe_long <- pivot_longer(data = anscombe, cols = everything(), names_to = c(".value", "key"), names_pattern = "(.)(.)") ԣσʔλ ॎσʔλ
ggplot(data = anscombe_long) + aes(x = x, y = y,
color = key) + geom_point() ggplot(data = anscombe_long) + aes(x = x, y = y, color = key) + geom_point() + facet_wrap(facets = . ~ key, nrow = 1) ਫ४ͰਤΛׂ͢Δ
まとめ
Rを始めよう Rの基礎知識 データ可視化の基礎 □ □ □ ✔ ✔ ✔
ࣸ૾ Ϧϯΰ ʢ࣮ଘʣ Ϧϯΰ ʢσʔλʣ mapping
Ϧϯΰ ࣸ૾ ϑϧʔπ ৭ ը૾ ࣮ଘ σʔλ νϟωϧ mapping
channel
𝑋 𝑌 𝑦! 𝑥! 𝑦" 𝑥" 𝑋 𝑌 𝑥! 𝑥"
𝑦! 𝑦" σʔλՄࢹԽ ࣸ૾ mapping x axis, y axis, color, fill, shape, linetype, alpha… aesthetic channels ৹ඒతνϟωϧ ggplot(data = my_data) + aes(x = X, y = Y)) + goem_point() HHQMPUʹΑΔ࡞ਤ
HHQMPUʹΑΔσʔλՄࢹԽ ࣮ଘ ࣸ૾ʢ؍ʣ σʔλ ࣸ૾ʢσʔλՄࢹԽʣ άϥϑ 𝑋 𝑌 𝑦! 𝑥!
𝑦" 𝑥" SBXEBUB 写像 aesthetic channels ৹ඒతνϟωϧ ՄࢹԽʹదͨ͠EBUBܗࣜ 変形 ਤͷͭͷ৹ඒతνϟωϧ͕ σʔλͷͭͷมʹରԠ͍ͯ͠Δ
࣮ଘ ਤ ࣸ૾ʢ؍ʣ ใ ࣸ૾ʢՄࢹԽʣ
Enjoy!!