class: center, middle, inverse, title-slide # Data wrangling ## Coding style ### Ben Baumer ### SDS 192Sep 28, 2020(
http://beanumber.github.io/sds192/lectures/mdsr_wrangling_03-style.html
) --- ## Coding style ![](https://imgs.xkcd.com/comics/code_quality.png) .footnote[https://xkcd.com/1513/] --- ## Literate Programming .pull-left[ ![](https://upload.wikimedia.org/wikipedia/en/6/62/Literate_Programming_book_cover.jpg) ] .pull-right[ - [Don Knuth](https://en.wikipedia.org/wiki/Donald_Knuth) (1985) - code and natural language interspersed - we implement this in R Markdown ] --- ## Hadley's style guide [![style](../gfx/style.png)](http://adv-r.had.co.nz/Style.html) --- ## `styler` .footnote[https://github.com/r-lib/styler] .pull-left[ - Use the `styler` package! - Code style is about readability, accessibility ] .pull-right[ ![](https://raw.githubusercontent.com/lorenzwalthert/some_raw_data/master/styler_0.1.gif) ] --- ## Who is Hadley? .footnote[https://en.wikipedia.org/wiki/Hadley_Wickham] .pull-left[ ![](https://pix-media.priceonomics-media.com/blog/1001/HadleyObama.png) ] .pull-right[ - from New Zealand (like R) - Ph.D. statistics from Iowa St. (2008) - Chief Scientist at RStudio - author of many R packages, including... ] --- ## `tidyverse` .pull-left[ [![](https://pbs.twimg.com/media/CvzEQcfWIAAIs-N.jpg)](http://tidyverse.org) ] .pull-right[ - collection of packages that all fit together ]