class: center, middle, inverse, title-slide # Data visualisation, reporting, and processing with R ## Closing remarks ### Kirill Müller ### 2017-10-20 --- # More transformations - Grouped `mutate()` and `filter()`, see r4ds 5.7.1 - Scoped functions, see `?scoped` - `complete()` and `fill()` - `extract()` ## Same syntax for working with databases - *dbplyr* package - Transformation operations are translated to SQL --- # Nested data frames r4ds, chapter 25 ```r flights %>% nest(-month) %>% arrange(month) ``` ``` ## # A tibble: 12 x 2 ## month data ## <int> <list> ## 1 1 <tibble [27,004 × 18]> ## 2 2 <tibble [24,951 × 18]> ## 3 3 <tibble [28,834 × 18]> ## 4 4 <tibble [28,330 × 18]> ## 5 5 <tibble [28,796 × 18]> ## 6 6 <tibble [28,243 × 18]> ## 7 7 <tibble [29,425 × 18]> ## 8 8 <tibble [29,327 × 18]> ## 9 9 <tibble [27,574 × 18]> ## 10 10 <tibble [28,889 × 18]> ## 11 11 <tibble [27,268 × 18]> ## 12 12 <tibble [28,135 × 18]> ``` --- # Pointers Working directory hell: - https://www.tidyverse.org/articles/2017/12/workflow-vs-script/ Symbolic link to data directory: - Linux and OS X: `file.symlink()` - Windows: `Sys.junction()` R markdown: http://rmarkdown.rstudio.com/gallery.html --- # Pointers 2 Literature: - Quick-R [http://www.statmethods.net](http://www.statmethods.net) - Advanced R [http://adv-r.had.co.nz](http://adv-r.had.co.nz) - Packages suggested by RStudio [https://github.com/rstudio/RStartHere](https://github.com/rstudio/RStartHere)