Introduction to RStudio
Overview
Teaching: 15 min
Exercises: 0 minQuestions
How do I use the RStudio graphical user interface?
Objectives
Learn the basic functions and navigation of RStudio
FIXME
Key Points
RStudio allows for a visual way to interact with R
Analysing Patient Data
Overview
Teaching: 60 min
Exercises: 0 minQuestions
Intro to IDE
How do I read data into R?
How do I assign variables? (object-oriented programming)
What is a data frame?
How do I access subsets of a data frame?
How do I calculate simple statistics like mean and median?
Where can I get help?
What is plotting
Objectives
read data into R
perform basic data operations
FIXME
Key Points
data frames are the most common data type used in R
R has built in functions for many common calculations and operations
Analysing Patient Data
Overview
Teaching: 15 min
Exercises: 0 minQuestions
How do I make a function?
How can I test my functions?
How should I document my code?
Objectives
create functions to reuse code
learn best practices for documentation
FIXME
Key Points
functions allow us to reuse code and make it more readable
documenting functions using best practices helps us and others in the future
Making Choices
Overview
Teaching: 30 min
Exercises: 0 minQuestions
How do I make choices using if and else statements?
How do I compare values?
How do I save my plots to a PDF file?
Objectives
use conditional logic
compare values to make choices
save plots to PDF
FIXME
Key Points
we can compare stored values
we can automate data production by setting up our choices in our R programs
Addressing Data
Overview
Teaching: 30 min
Exercises: 0 minQuestions
What are the different methods for accessing parts of a data frame?
Objectives
access data by row, column, or entry
FIXME
Key Points
data can be manipulated by column or individual entry
there are different ways to access parts of a dataframe depending on the user’s needs
Dealing with Messy Data
Overview
Teaching: 30 min
Exercises: 0 minQuestions
What do I do when my data is messy?
Objectives
learn to address common issues when cleaning data
learn to address incorrect variable types. NA values, missing values, decimal points, lowercase vs uppercase in strings
FIXME
Key Points
there are common issues a user can look for when working with new data
making sure your data is clean before you start analysing will help make it easier
Best Practices for Writing R Code
Overview
Teaching: 15 min
Exercises: 0 minQuestions
How can I write R code that other people can understand and use?
Objectives
learn best practices to make your code useable for others
FIXME
Key Points
making your code readable allows for others to collaborate
Dynamic Reports with knitr
Overview
Teaching: 30 min
Exercises: 0 minQuestions
How can I put my text, code, and results all in one document?
How do I use knitr?
How do I write in Markdown?
Objectives
learn the basics of markdown
knit/render RMarkdown documents into PDF or html
FIXME
Key Points
R and markdown allow users to create all-in-one documents with code, text, and outputs
Understanding Factors
Overview
Teaching: 30 min
Exercises: 0 minQuestions
How is categorical data represented in R?
How do I work with factors?
Objectives
learn how to perform operations on factors
FIXME
Key Points
factors are what allow us to work with categorical data
Data Types and Structures
Overview
Teaching: 40 min
Exercises: 0 minQuestions
What are the different data types in R?
What are the different data structures in R?
How do I access data within the various data structures?
Objectives
be able to indentify and create different data types and structures in R
manipulate and perform operations on different data types and structures
access and perform operations on data within different data structures
FIXME
Key Points
while tibbles are important, users may come accross data that needs to be stored in different data types
Loops in R
Overview
Teaching: 30 min
Exercises: 0 minQuestions
How can I do the same thing multiple times more efficiently in R?
What is vectorization?
Should I use a loop or an apply statement?
Objectives
understand loops types and create them
identify and perform vectorized operations
identify and understand when to use loops or vectorized operations
FIXME
Key Points
loops consume computer resources and should be used sparingly
R has vectorized operations to make classical looping operations faster
Analyzing Multiple Datasets
Overview
Teaching: 20 min
Exercises: 0 minQuestions
How can I do the same thing to multiple data sets?
Objectives
learn how to perform the same operations on multiple datasets
FIXME
Key Points
loops and vectorized operations help us perform operations on multiple datasets
Command-Line Programs
Overview
Teaching: 20 min
Exercises: 0 minQuestions
How do I write a command-line script?
How do I read in arguments from the command-line?
Objectives
write a command-line script in R
read in arguments when running a command-line script
FIXME
Key Points
R can be written and run in RStudio as well as the command line
The Call Stack
Overview
Teaching: 30 min
Exercises: 0 minQuestions
What is the call stack, and how does R know what order to do things in?
How does scope work in R?
Objectives
identify and undestand processes in the call stack
identify what the scope of a given variable is
FIXME
Key Points
scope tells us where variables are accessible from
order of processes in the call stack can affect how our code is run
Making Packages in R
Overview
Teaching: 20 min
Exercises: 0 minQuestions
How do I collect my code together so I can reuse it and share it?
How do I make my own packages?
Objectives
package code for reuse and distribution to others
FIXME
Key Points
packages are an easy way to share reuseable code