# R Workshop Agenda

R Workshop Agenda

• R Introduction
1. Structure of course
2. Ensure all students have R and RStudio on their machines
3. Utility of R
4. Describe packages
1. Examples of packages
2. demo
3. vignettes
• RStudio
1. Anatomy of the RStudio interface
1. Console
1. Up arrow shortcut
2. auto fill
2. Workspace, history
1. Run line
3. Files, plots, packages, help
4. Scroll through plots tab
5. R script and data view
• Reading data into R and saving Data
1. “require”
1. Set default working directory
2. getwd, setwd, dir
3. dir(pattern = “….”)
4. function call
3. Importing comma delimited (.csv)
1. Workspace … “Import Dataset”
2. Command line import
4. Native R data types (.RData)
5. Write .csv files using “write”
• R-Syntax
1. Value to variable assignment
1. sequence, repeat, concatenate
2. Indexing
3. Arithmetic operators
4. Logical operators
5. Function calls
• Dealing with NA’s and missing data
1. Finding missing data
2. Dealing with missing data
• Debugging
1. Understanding error messages
2. Online resources
• Data Classes including vectors, matrices, lists, data frames and factors
1. Introduction to base R data classes.
2. Manipulate and create data using fundamental functions.
4. Create and use data frames.
5. Indexing
6. Use positive and negative indices
7. Subset values and perform statistical and mathematical operations on data.
1. which
2. na
3. T/F
4. subset
• Functions
1. Built-in Functions in R
2. Function arguments
3. Using the help
• Loops
1. “hello world”
2. Examples of the utility of loops
• Logic, if, else
1. Utility of built in contingent functions
2. Logic Review
3. Logical queries and sub setting
4. If and else statements
5. Ifelse() statements
6. Practice
• Basic Plotting in R
1. How plot functions work
2. Common plot functions
1. Histograms
2. Plots
3. Boxplots
3. Error Bars
4. Practice
5. Barplots
1. Custom Axes Labels, Symbols, and Colors
2. Plot Area
3. Multi-panel figures
4. Adding legends, text and margin text
5. Plotting with for loops
• Saving Images
1. Point and Click in RStudio
2. Functions
• Developing an R Script
1. Coding Syntax
2. Clean workspace
3. Annotation
4. Writing flexible code
1. Syntax
2. Debugging
3. Benefits of writing your own code
4. Make: SEM
• Statistical Analyses I Linear Models
1. Z-scores
2. Quantiles
3. Tests for normality and homogeneity of variance
4. Create Simple Linear Model
5. ANOVA
6. Nonlinear curve fitting
• Statistical Analyses II non-linear Models
1. Model objects
2. Nls()
3. Curve()
4. Confidence intervals and AIC
5. Practice
• plyr and tidyr packages
1. plyr
2. tidyr
3. Data reshaping
4. Selecting and filtering data
5. Piping, summarizing, grouping and mutating
6. Practice