raed_csv() write_csv() Table Data Wide form Long form pivot_longer() Nested form pivot_wider() Plot group_nest() unnest() {ggplot2} {patchwork} Image Files ggsave() Data Processing
data.frame *bble raed_csv() write_csv() Table Data Wide form Long form pivot_longer() Nested form pivot_wider() Plot group_nest() unnest() {ggplot2} {patchwork} Image Files ggsave() 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
data.frame *bble raed_csv() write_csv() Table Data Wide form Long form pivot_longer() Nested form pivot_wider() Plot group_nest() unnest() {ggplot2} {patchwork} Image Files ggsave() Data Processing
Long form → Wide form data pivot_wider( data = df_long_1, values_from = value, names_from = name ) pivot_wider( data = df_long_2, values_from = c(x, y), names_from = tag )
data.frame / *bble raed_csv() write_csv() Table Data Wide form Long form pivot_longer() pivot_wider() Plot {ggplot2} Image Files ggsave() Data Processing
raed_csv() write_csv() Table Data Wide form Long form pivot_longer() pivot_wider() Plot {ggplot2} Image Files ggsave() Data Processing Long form Long form Long form Long form Long form Long form Long form Long form data.frame / *bble
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 Introduc6on to dplyr h"ps://cran.r-project.org/web/packages/dplyr/vigne"es/dplyr.html WFSCT {dplyr}
(SBNNBSPGEBUBNBOJQVMBUJPO By constraining your [email protected], it helps you think about your data [email protected] challenges. Introduc6on to dplyr hFps://cran.r-project.org/web/packages/dplyr/vigneFes/dplyr.html
1JQFBMHFCSB X %>% f X %>% f(y) X %>% f %>% g X %>% f(y, .) f(X) f(X, y) g(f(X)) f(y, X) %>% {magri7r} 「dplyr再⼊⾨(基本編)」[email protected] 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 invalida:on 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) %>% {magri7r} 「dplyr再⼊⾨(基本編)」[email protected] h"ps://speakerdeck.com/yutannihila6on/dplyrzai-ru-men-ji-ben-bian
より多くの制約を課す事で、 魂の⾜枷から、より⾃由になる。 Igor Stravinsky И@горь Ф Страви́нский The more constraints one imposes, the more one frees one's self of the chains that shackle the spirit. 1882 - 1971 ※ 割と意訳
import Tidy Transform Visualize Model Communicate Modified from “R for Data Science”, H. Wickham, 2017 preprocessing Data science Data Observa=on Hypothesis NarraFve of data feedback Data processing
data.frame / *bble raed_csv() write_csv() Table Data Wide form Long form pivot_longer() pivot_wider() Plot {ggplot2} Image Files ggsave() Data Processing
raed_csv() write_csv() Table Data Wide form Long form pivot_longer() pivot_wider() Plot {ggplot2} Image Files ggsave() Data Processing Long form Long form Long form Long form Long form Long form Long form Long form data.frame / *bble
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 Introduc6on to dplyr h"ps://cran.r-project.org/web/packages/dplyr/vigne"es/dplyr.html WFSCT {dplyr}