Module 2: Getting Started with R
R is the software package that is the primary focus of this training. For this module, R is two separate software packages and installs.
Core R is available from https://www.r-project.org/ or by using a mirror such as http://cloud.r-project.org. Core R is created and published by the R Core Development Team. Fundamentally the view that Core R is a command line only tool, used for production deployments only, should be adopted. R Core \ R Command Line is used very little in this training course and is predominantly shown as a precursor to RStudio Console.
Once R Core is downloaded and installed, the command line application is available in C:\Program Files\R\R-3.3.2\bin\titled R.exe although navigation to and invocation of the application is detailed in procedure 1.
In this example, the latest version of R for Windows has been installed with the default settings.
RStudio is a feature rich Integrated Development Environment (so-called IDE) that improves productivity in creating R Scripts, although in production the execution of these scripts might well fall to the core installation.
The software can be downloaded from https://www.rstudio.com/products/RStudio/ and is free, although there are commercial editions.
As with R Core, the defaults have been left unchanged during the installation.
Table of contents
- Slides
- Procedure 1: Navigate to and launch the R command line
- Procedure 2: Issue commands to the R Console
- Procedure 3: Set a Working Directory
- Procedure 4: Run a script from the R command line
- Procedure 5: Launching R Studio
- Procedure 6: Identify Packages Installed
- Procedure 7: Browsing and Installing Packages
- Procedure 8: Review Help and Documentation
- Procedure 9: Load and Unload Packages in RStudio
- Procedure 10: Load Packages using Script
- Procedure 11: List all Functions in a Package
- Procedure 12: Use the help() function to explain a function
- Procedure 13: Unloading a Package
- Procedure 14: Creating a Numeric Variable by Assignment
- Procedure 15: Create a string variable by assignment
- Procedure 16: Create a logical variable by assignment
- Procedure 17: List Variables in R
- Procedure 18: Remove Variables in R