Installation of R/RStudio
Institute of Linguistics, Academia Sinica
2024-11-26
We are actually referring to two programs:
Main program: R
This is where all the magic happens.
Interface: RStudio
User-friendly interface such that it is easier to work with.
And now, think about it
You have done these tasks by using your mouse or your touchpad and clicking on icons (or figures) on your screen.
What you may not know is that when doing so, you have run many lines of codes. Your computer ran them in programs able to perform computations.
Your role has been to trigger these programs by using the user-friendly interface installed in your computer.
This is the exact same thing with R and RStudio.
R will perform the computations that you ask for. And you will ask R to do stuff by clicking on icons and writing commands using the user-friendly interface of RStudio.
And this is why you need to download two programs!
You can download R for free from the official website here.
You have to look for the link in the middle of the first paragraph on the front page.
Then, you need to choose your CRAN. Let’s choose the one in Taiwan. You will need to scroll down the page to find the link.
Now you need to choose the files to download according to the system of your computer. The likeliest to use are for MacOS (if you have a MacBook computer) or for Windows (if your system is Microsoft).
On the next page, you will need to choose the subdirectory that you need. For our purposes, we’ll only need the “base” subdirectory.
We finally got to the last page!
Just click on the first link to download the files, as in the image. Wait until the file is downloaded, open it and follow the instructions to install R on your computer.
Now that R is installed on your computer, it is time to do the same with RStudio. First, let’s go to the RStudio website by clicking here , and you will see something like that (if not, it is just that the RStudio website has changed):
Once you are on the front page, just scroll down to look for the links to download the installing files. Again, you will need to choose the right file to download according to the system of your computer: Window, macOS (for the most common), or another one.
Just click on the link and the file will start to be downloaded! Again, give it some minutes, then open the file and follow the instructions to install RStudio on your computer.
Look for the program called “RStudio” on your computer. Maybe you even have a shortcut on your desktop after installing it. Once you found it, just open RStudio, and you can go to the next section!
Think about it
Recall that R is the program where the computations are done, and RStudio the user-friendly interface. You may ask why I only said to open the RStudio program when it is only an interface. The good news is, even if we need to download both R and RStudio, you actually only need to open RStudio when you want to use R!