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, example projects, resources, and references.

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.

The Native R Environment

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.

Using 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 data in 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
Plotting multiple charts together
Charts and plots using ggplot2


Example Projects using R

Text mining Twitter Data

Blood pressure database example

Working with the World Bank climate data

















Return to John Aleshunas' Webster Web Page