8  R, RStudio, and Script Files

8.1 What is R?

R is a free open source programming language for statistical computing and graphics that is widely used in both academia and industry. R has a large library of external packages available for performing diverse tasks. R also includes extremely powerful graphic capabilities.

8.2 What is RStudio?

RStudio (also commercially known as Posit) is an integrated development environment (IDE) for R.

8.3 Why use RStudio?

  • It’s free!
  • Easy to share your data & code
  • You can contribute!
  • It’s powerful and flexible
    • Can create websites
    • Create documents
    • Slideshows (just like these slides!)
    • Books
    • Web applications
  • Used across many industries
  • Enhance reproducibility & transparency
  • Generates ready-to-publish graphs!
Tip

If you use Twitter, post R-related questions and content with #rstats. The community is very helpful. Searching for R on Google can sometimes be tricky because the program name is a single letter! Try using for example “r scatterplot”.

See also ‘References’ for more useful resources.

8.4 Working with RScript files

  • Go to RStudio and open a new RScript file. We will be working through problems together.
  • RScript files give us an easy way to edit and save our work.