R is an open source programming language used for data and statistical analysis. I know the term ‘programming language’ makes for an intimidating outlook when you thin of R but trust that it is simpler than it sounds. There is also so much information around the web to help along your journey.
Why R?
Reproducibility: The use of a code-based method for data analysis makes reproducibility much easier. How? You might ask. This means you can use a reproducible R script you created to open, run and edit a data set in future and still get similar results. The repeatability in R also means you can use the same code to manipulate different data sets in future.
Collaboration: In addition to reproducibility, being an open-source software, R allows for collaboration between data scientists (data science is a teams sport, aye!). By configuring your project to use either one of the two known version control systems—Git or Subversion, you essentially allow other people to review your code changes in order to improve the quality of your work.
It gets better. Given its open-source nature, you have different people making different R packages that provide a wide range of tools and functions that you will need during analysis. Some of these essential packages include dplyr, readr and stringr (for data manipulation and wrangling) and ggplot2 (for graphics), just to name a few.
R vs R Studio
Installing R is pretty straight forward. But, before we get deeper into that, how about we get the difference between R and R Studio. You might have heard them being used interchangeably but they are like two different faces of the same coin (to me, at least).
R is a programming language mainly used for data and statistical analysis. That’s clear, right? R Studio is an Integrated Development Environment (IDE) tailored specifically to work with R. I like to think of R and R Studio as the engine and dashboard of a car. While most of us don’t understand car mechanics, the dashboard gives a peek into the car’s performance and alerts us of any problems. R Studio gives us a user-friendly interface into with features like code highlighting, interactive plots which are more visually appealing compared to the command-line interface where R code is executed.
Installing R and R Studio
Installing R and R Studio to your computer is as easy as installing any other web-based software. No intimidating codes, I promise. You just need to know where to get them from.
For R, go to r-project.org and click on Download R. This will direct you to Comprehensive R Archive Network (CRAN) page where you will choose a url in a location close to you.
“CRAN is a network of ftp and web servers around the world that store identical, up-to-date, versions of code and documentation for R. Please use the CRAN mirror nearest to you to minimize network load.”
—r-project.org
On the web page that opens, choose your computer’s operating system and click on the respective link (install the latest version, that’s the topmost option). Follow the subsequent prompts and your download will begin.
Upon completion, follow prompts to install the packages in your computer.
Installing R Studio
To install R Studio IDE, go to posit.co and click on the blue ‘Download RStudio’ button. (Note that if you go to rstudio.com, you will be redirected to posit.co).
You’ll be directed to a page where you will be able to download the right R Studio package depending on your OS environment. Download the free version.
Your download will begin almost immediately. Follow the prompts to install the packages to your computer and voila!
Easy, right?
This is the site that meets you when you open R Studio. Take note of the four sections. Now we are ready for R expolaration.
Next, we will try to make sense of this screen and learn some basics.
Cheers!