Using R and RStudio Desktop
About R π
R is a statistical programming language that supports a wide range of data analysis, processing, and visualization activities.
Additional documentation:
The R Manuals (Re-styled by RStudio)
About RStudio π
Most people who work with R use an IDE (or integrated development environment) to write, execute, and test code. For this course, we recommend using the free, open-source RStudio Desktop application.
Additional documentation:
Customizing RStudio π¨
Alternatives to RStudio π§°
One popular alternatives include Visual Studio Code (using the R extension and other additions).
Individuals who prefer a command line interface may use GNU Emacs (using the ESS plugin) or Vim (using the Nvim-R plugin).
Introductory resources π£
The RStudio Cheatsheets are one-page printable quick reference sheets created by RStudio staff and contributed by volunteers. You may want to print out the following cheatsheets for a convenient reminder on keyboard shortcuts, useful functions, and typical workflows:
Basics of working with R at the command line and RStudio goodies (from STAT 545 by Jenny Bryan and the STAT 545 TAs)
R for Data Science (R4DS) by Hadley Wickham and Garrett Grolemund
βThis book will teach you how to do data science with R: Youβll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this book, you will find a practicum of skills for data science.β
D-Labβs R Fundamentals Workshop: βa broad overview of the fundamentals of using R, a programming language geared toward statistical analysis and data science.β
Getting help π
R packages for this course π¦
Unlike plugins for QGIS, packages are effectively required to work with spatial data in R. The following table lists the key packages we use most often during this course.
This list is not comprehensive. Other packages that are relevant for one specific section of the course will be noted elsewhere in the provided course materials and the packages for spatial data analysis are described in more detail on the resource page for Using R for spatial data.