Overview
This module reviews the basics of the R programming language and its open-source development environment, RStudio. It reviews the basic operations involved in accessing the R platform and bringing the contents of a standard data file into the programming environment.
Topics
- Using R & RStudio
- Starting a Session
- Working with Objects
- Working with Scripts
- Importing & Exporting Data and Objects
- Working with Packages
- Working with Environments
Operations & Packages
- Defining and Removing Objects: <-, c(), rm()
- Identifying Data Types: typeof()
- Working with Memory: ls(), gc()
- Working Directories: setwd()
- Importing Data: read.csv(), readRDS(), foreign, readxl
- Subsetting: $, [x], subset()
- Working with Packages: install.packages(), library()
- Creating Popup Windows for File Selection: file.choose()
- Executing Scripts: source()
- Basic Variable Summaries: summary()
- Exporting Data & Objects: write.csv(), saveRDS()
- Calling Python: reticulate
- Attaching and Detaching Objects to Memory: attach(), detach()
Readings
- The Big Book of R
- Joseph Cohen (2020) “Getting Started” Class Notes.
- Joseph Adler (2009) R in a Nutshell. O’Reilly
- Paul Teetor (2011) R Cookbook. O’Reilly
- Richard Cotton (2013) Learning R. O’Reilly
- RStudio Hotkeys
- Playing with Pipe Notation
- Calling Python from R
- Statistical Software from a Blind Person’s Perspective
- Version Control with Git and SVN
- Using Github