What is R?
R is a language and environment for statistical computing and graphics. RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.
Installing R
Go to the R website and download the installer file. Once downloaded, open the installer file and follow the instructions.
Installing RStudio
Go to the R studio website, and follow the links to download RStudio. The version you want is the “RStudio Desktop”. Once the installer is downloaded, open it and follow the instructions.
RStudio Interface
The console is where you will find the output of your coding and computations.
The source window can fulfil many functions, such astab shows all the active objects. The term ‘source’ can be understood as any type of file, e.g. data, programming code, notes, etc.
The environment tab shows you objects which are available for computation. The history tab stores your computatipns you in the consol. The connections tab allows you to tap into external databases directly. You can find additional materials to learn R and RStudio in the tutorials tab.
The files lists all the files and folders in your root directory. The plots panel produces data visualizations, which will be important for today’s tutorial. Packages are additional tools you can import and use when performing your analysis. A frequent analogy people use to explain packages is your phone and the apps you install. Each package you download is equivalent to an app on your phone. The help panel allows you to search for specific topics, for example how certain computations work. It provides additional metadata that may be important in determining how a function or argument works.
Works cited:
- R
- RStudio
- Navarro, Danielle. Learning statistics with R.
- Dauber, Daniel. R for Non-Programmers: A Guide for Social Scientists