class: center, middle, inverse, title-slide .title[ # DS 202 - Tools of the Trade ] .author[ ### ] --- In this class we will use - R and RStudio: make sure you have newish versions installed (>= R 4.3.x; RStudio 2023 or later) - markdown and Rmarkdown, see [Rstudio cheat sheet](https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) - git & github resources - Jenny Bryan's: Happy Git with R http://happygitwithr.com/ - Data Carpentry's tutorials: https://github.com/datacarpentry - Reproducible Science Curriculum intitative: https://github.com/Reproducible-Science-Curriculum <!-- - Small 'mind map' of git functionality: https://rachelcarmena.github.io--> --- # Outline for today - install / update R and RStudio - do a data exploration - install git / github and link it to RStudio --- # Installing R - Make sure to have R version 4.x.x installed - Go to [http://www.r-project.org/](http://www.r-project.org/) - Click the CRAN link on the left, and pick a download site (0-Cloud is a good choice) - Choose link based on your OS - On Windows, choose the "base" subdirectory to install R. - On OS X, choose the .pkg file to install R. --- # Installing RStudio - RStudio-2024 supports both R and python (Jupyter notebooks) - Browse to [https://posit.co/](https://posit.co/) - Click DOWNLOAD RSTUDIO - Click Download RStudio Desktop - Choose the installer appropriate for your platform --- # RStudio is ... - an excellent IDE for R (and python) [From Julie Lowndes, Data Scientist at Openscapes](http://jules32.github.io/resources/RStudio_intro/): <blockquote> <b>If R were an airplane, RStudio would be the airport</b>, providing many, many supporting services that make it easier for you, the pilot, to take off and go to awesome places. Sure, you can fly an airplane without an airport, but having those runways and supporting infrastructure is a game-changer. </blockquote> --- ## The RStudio IDE <img class="cover" src="images/rstudio-panes.png" alt=""> --- ## The RStudio IDE 1. **Source editor:** Docking station for multiple files, Useful shortcuts ("Knit"), Highlighting/Tab-completion, Code-checking (R, HTML, JS), Debugging features 2. **Console window:** Highlighting/Tab-completion, Context help, Search recent commands 3. **Environment pane:** Tools for package development, git, etc 4. **Other tabs/panes:** Graphics, R documentation, File system navigation/access <br> <br> *Protip:* save yourself the headaches figuring out file paths and instead work in an RStudio R project (popup menu at the top left)