To get started, you first need to install R. Next, we highly recommend using RStudio, an integrated development environment (IDE) that makes working with R much easier (RStudio’s setup is familiar to those of who have prior experience with Matlab). RStudio comes with the very handy RProj
environment and provides many built-in features that help facilitate data analysis and modelling tasks.
Visit https://cloud.r-project.org/ and click on the download link that fits your operating system.
Visit https://www.rstudio.com/ website and click the download button. The free version covers (way) more than what you need for this course.
Three recommended RStudio settings:
Always use a project-oriented workflow, where each task, assignment, etc. is a standalone project. Remember: If you need your R script to start withsetwd()
and rm(list=ls())
than are doing something wrong!
Go to Tools -> General Options -> General and set the Save workspace to .RData on exit to NEVER. This option improves the reproducability of your projects since it causes you to start every project in a new R session, i.e., a clean environment without any objects or packages pre-loaded.
Go to Tools -> General Options -> Git/SVN and check the “Enable version control interface to RStudio projects” box. Next, make sure that the “Git executable” points to the git binary file (e.g., “C:/Program Files/Git/bin/git.exe”).
If for some reason you insist on not using RStudio, we can suggest a couple alternative open-source IDEs:
Note that all IDEs, RStudio included depend on R being installed.
Datacamp’s Introduction to R and Working with the RStudio IDE (Part 1) courses.
A step-by-step guide to get you started with R and RStudio.
Garrett Grolemund and Hadley Wickham’s R for Data Science will teach you how to augment R with the tidyverse.
RStudio cheat sheets where you can find, among others, an RStudio IDE and RMarkdown cheat sheets.
Getting used to R RStudio and RMarkdown will show you how to seamlessly communicate your analysis to others using RMarkdown.
A website created by Itamar Caspi using RMarkdown.
Disclaimers: (1) The official syllabus and the content on the official Moodle website shall always prevail in case of any discrepancy or inconsistency between this website and its official HUJI versions; (2) This website and its content do not necessarily reflect the views of the Bank of Israel or any of its staff.