Getting Started

Author

Aubrey Mpungose

1.1 Installing R

  • R Can be downloaded from CRAN, The Comprehensive R Archive Network. Simply go to the CRAN wesbite

  • Download the latest version of R (currently R-4.2.1 ) depending on the operating system of your machine:

    • Windows
    • macOS
    • Linux

1.1 Installing RStudio

Rstudio is an Integrated Development Environment (IDE) that makes it easier working with R. This might be trickier for beginners who are not familiar with programming. Think of R as the engine that makes the car run. RStudio would be additional aesthetics that makes the car look better. You can use R without RStudio to analyse data, but you cannot use RStudio without R. You can download the latest version of RStudio here. Make sure to sure RStudio Desktop

R console

RStudio

In RStudio, you have 4 panes, the script, where you can write lines of code and save the script for future purposes. On the top-right you have the Environment pane, where we can view the list of objects we have created in R; objects can include tables, datasets, models, plots, etc. On bottom-right, we have a console, it is the typical console we found R. Lastly, the last pane have different components/tabs: files tzb, where we can view the list of files we are connected to or are using; for example, where you stored you dataset. It also has a plot tab, used for viewing plots/graphs.