import Tidy Transform Visualise Model Communicate Modified from “R for Data Science”, H. Wickham, 2017 preprocessing Data science Data [email protected] Hypothesis feedback Data processing Narra/ve of data
import Tidy Transform Visualise Model Communicate Modified from “R for Data Science”, H. Wickham, 2017 preprocessing Data science Data [email protected] Hypothesis Narra/ve of data feedback Data processing
raed_csv() write_csv() Data Wide form Long form pivot_longer() Nested form pivot_wider() Figures group_nest() unnest() {ggplot2} {patchwork} Data processing
raed_csv() write_csv() Data Wide form Long form pivot_longer() Nested form pivot_wider() Figures group_nest() unnest() {ggplot2} {patchwork} data.frame tibble Data processing
> str(list3) List of 2 $ A: int [1:3] 1 2 3 $ B: int [1:3] 11 12 13 > str(df1) 'data.frame': 3 obs. of 2 variables: $ A: int 1 2 3 $ B: int 11 12 13 list3 df1 named list & data.frame
raed_csv() write_csv() Data Wide form Long form pivot_longer() Nested form pivot_wider() Figures group_nest() unnest() {ggplot2} {patchwork} data.frame tibble Data processing
raed_csv() write_csv() Data Wide form Long form pivot_longer() Nested form pivot_wider() Figures group_nest() unnest() {ggplot2} {patchwork} data.frame ,bble Data processing Transform (verb [email protected]) {dplyr}
It (dplyr) provides simple “verbs” to help you translate your thoughts into code. func?ons that correspond to the most common data manipula?on tasks Introduc>on to dplyr h"ps://cran.r-project.org/web/packages/dplyr/vigne"es/dplyr.html WFSCT {dplyr}
1JQFBMHFCSB X %>% f X %>% f(y) X %>% f %>% g X %>% f(y, .) f(X) f(X, y) g(f(X)) f(y, X) %>% {magri8r} 「dplyr再⼊⾨(基本編)」yutanihilaCon h"ps://speakerdeck.com/yutannihila6on/dplyrzai-ru-men-ji-ben-bian
Bring milk from the kitchen! Robot' Robot'' Robot''' result result % lift(glass, table) %>% take(fridge, milk) %>% pour(milk, glass) %>% put(glass, table) by using pipe, # ① # ② # ③ # ④ # ① # ② # ③ # ④
The @dyverse style guides h"ps://style.;dyverse.org/syntax.html#object-names "There are only two hard things in Computer Science: cache invalidation and naming things"
Bring milk from the kitchen! Robot' Robot'' Robot''' result result % lift(glass, table) %>% take(fridge, milk) %>% pour(milk, glass) %>% put(glass, table) by using pipe, # ① # ② # ③ # ④ # ① # ② # ③ # ④
Robot' Robot'' Robot''' result result % lift(glass, table) %>% take(fridge, milk) %>% pour(milk, glass) %>% put(glass, table) by using pipe, # ① # ② # ③ # ④ # ① # ② # ③ # ④ Thinking Reading Bring milk from the kitchen!
1JQFBMHFCSB X %>% f X %>% f(y) X %>% f %>% g X %>% f(y, .) f(X) f(X, y) g(f(X)) f(y, X) %>% {magrittr} 「dplyr再⼊⾨(基本編)」yutanihilation https://speakerdeck.com/yutannihilation/dplyrzai-ru-men-ji-ben-bian
(SBNNBSPGEBUBNBOJQVMBUJPO By constraining your op9ons, it helps you think about your data manipula9on challenges. Introduc>on to dplyr hLps://cran.r-project.org/web/packages/dplyr/vigneLes/dplyr.html
より多くの制約を課す事で、 魂の⾜枷から、より⾃由になる。 Igor Stravinsky И8горь Ф Страви́нский The more constraints one imposes, the more one frees one's self of the chains that shackle the spirit. 1882 - 1971 ※ 割と意訳