Installing R
Why R?
Many students starting out for the first time ask "Which stats software should I use? R or Stata?" The debates have gotten stale so I hired the couple on TikTok again to come in and give their two cents. pic.twitter.com/Enl9jz8KHx
— scott cunningham (@causalinf) August 19, 2022
Installing R and RStudio
Installing R
First we need to install R.
Go to the CRAN(Collective R Archive Network) website https://cran.r-project.org/
You should see download R for your operating system at the top of the page under “Download and Install R”
If you use macOS make sure you choose one of the notarized and signed versions. Right now it is 4.2.1. If you have an intel based mac choose the first one. If you have an ARM mac than choose the ARM one.
- If you use Windows, click “base” (or click on the on the bolded one that says “install R for the first time and download it).
Double click on the downloaded file(check your
Downloads
folder). Click yes on all the promptsIf you are on a Mac you also need to download and install XQuartz. If you are on a windows machine you do not need to install XQuartz
Installing RStudio
Next, you need to install RStudio, the nicer integrated devloper environment (IDE) for R (the dashboard). Once R and RStudio are both installed, you can ignore R and only use RStudio. RStudio will use R automatically and you won’t ever have to interact with it directly.
Go to the free download location on RStudio’s website: https://www.rstudio.com/products/rstudio/download/#download
The Website should detect what operating system you are on and show a button that says *“Download RStudio for __* If not scroll and select the Rstudio for your operating system.
Double click on the downloaded file(check your Downloads folderr). Click yes for each prompt.