R Learning Infrastructure

R is a programming language and software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing. This project will develop an infrastructure that can help individuals easily learn and use R and RStudio. This infrastructure will include elements like: concept descriptions [modules], tutorials, exercises, resources, and references.

Most of the infrastructure content is stored as pdf files rather than as web pages. While this may seem odd, it allows users to save specific content locally and reference as needed without the need of web access. Additionally, this method allows me to use individual pdf files to response to specific student questions in the classes I teach that use R.


Topics


Introduction to R and RStudio

Downloading R and RStudio

Installing R and RStudio
Installing R - This step is simple. Once you have downloaded R, look in the Downloads folder on your computer for the R installation file. Double click the file to run it and install R. Once the installer finishes, you have the latest version of R ready to use on your computer.

Installing RStudio - This step is simple. Once you have downloaded RStudio, look in the Downloads folder on your computer for the RStudio installation file. Double click the file to run it and install RStudio. Once the installer finishes, you have the latest version of RStudio ready to use on your computer. The installation process will automatically link RStudio to the version of R already on your computer.

Tour of RStudio

Setting the default folder in RStudio

Updating R and RStudio

R and the functional programming model

R Packages
Installing packages in R
Updating packages in R

Using the R command line

R scripts [saving and running your code]

Creating an R script
Saving an R script
Opening an R script

Executing code in an R script
• Running the entire script
• Running selected lines from a script
Comments in an R script [documenting your code]
• Real programmers do not document their code. If it was hard to write, it should be hard to understand.

R as a calculator
A note about computers and computing precision in R

R objects as storage entities
Save a value or string in an object
Change the value of an object
Save the output of a function in an object

Read data into R
The default R datasets included in the base R distribution
Read an R dataset
Read a text file
Read a csv file
Other input file types

Saving an R data file
R dataset files
Text files
Working with Excel files in R 

Working with a vector, matrix, or data frame [indexing]

Internet resources [...use the Google...]

R Function arguments
Understanding R package documentation

R error messages and odd behavior

Creating your own R functions

Charts and plots in R
Base charts and plots in R
Charting and plotting function arguments
Plotting multiple charts together
Charts and plots using ggplot2













Return to John Aleshunas' Webster Web Page