class: title-slide <br> <br> .right-panel[ # Style Guides ## Dr. Mine Dogucu ] --- ### machine- and human-readable code ``` ## mpg wt am ## Mazda RX4 21.0 2.620 1 ## Mazda RX4 Wag 21.0 2.875 1 ## Datsun 710 22.8 2.320 1 ## Hornet 4 Drive 21.4 3.215 0 ## Hornet Sportabout 18.7 3.440 0 ## Valiant 18.1 3.460 0 ``` -- ```r lm(mpg~wt,data=subset(mtcars,am==1),na.action=na.omit(wt)) ``` -- ```r lm(mpg ~ wt, data = subset(mtcars, am == 1), na.action=na.omit(wt)) ``` --- class: middle > Good coding style is like correct punctuation: you can manage without it, butitsuremakesthingseasiertoread. Hadley Wickham --- class: middle [Google's R Style Guide](https://google.github.io/styleguide/Rguide.html) [The tidyverse style guide](https://style.tidyverse.org/) [The State of Naming Conventions in R](https://journal.r-project.org/archive/2012-2/RJournal_2012-2_Baaaath.pdf) --- class: middle In this course, we will use [the tidyverse style guide](https://style.tidyverse.org/).