Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.7 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.7 KB

Introduction to R

These materials are intended for an audience new to coding. They take users from setting up a project in R to data manipulation with dplyr and graphing with ggplot2. I opted for .R files instead of .Rmd based on the philosophy that seeing pure code is easier to process than code + markdown formatting at the same time. The full contents are as follows:

Part 1

  • Why should we code?
  • Setting up a project and organizing files
  • R as a calculator
  • Variable assignment
  • Control flow: if/else
  • Control flow: for/while
  • Functions
  • Coding best practices

Part 2

  • Installing and attaching packages
  • Loading datasets
  • Data manipulation with dplyr
  • Graphing with ggplot2
  • Basic statistical analyses: t-test, linear regression
  • Troubleshooting advice

Setting Up R

Before using these materials, you should download both R and RStudio. Briefly, R is the programming language itself and RStudio is software that makes it easier to code in R and organize your files.

Download R first, then RStudio.

Links for downloading R:

Link for downloading RStudio: https://posit.co/download/rstudio-desktop/

Additional Resources

This is not an exhaustive list of additional resources, but provides some immediately useful materials following the content of the two introductory sessions.