Speaking R
The R Environment
(Downloading R and RStudio; RStudio interface; Working directory; Objects)
video tutorials
R Commands
(Using R as a calculator; Print; R commands; Comments; Packages; Getting help)
video tutorials
Writing R Code
(Being reproducible; Organizing code; Syntax; Miscellaneous)
Data Structures
Vectors
(Generating sequences; Arithmetic operations; Logical vectors; Operators; Character vectors; Missing values; Indexing; Data types; Attributes)
video tutorials
Data Structures
(Factors; Matrices and Arrays; Lists; Data frames)
More on Subsetting
(Storing temporary outputs; Modifying object elements; subset(); %in% operator)
Working with JSON Data
(JSON objects; JSON arrays; Nested JSON objects; JSON files)
Control Flow
Conditional Statements
(if; if ... else if; if ... else if ... else; if ... else; Nested if; Vectorized ifelse())
Loops
(for loops; Nested loops; while loops; break; next)
Functions
Functions
(Creating and calling functions; Arguments; Returning values; stop(); Recursive functions; Nested functions; Scope of variables)
Exploring Data
Reading Data
(Importing data with RStudio; Reading rectangular text data; Reading data from other software; Reading data of JSON format; Working with databases)
A Glimpse of Your Data
(Summary statistics; Exploratory data analysis)
Data Manipulation
Data Transformation
(Recoding variables; Adding/dropping columns and rows; Renaming variables; Arranging rows; Reordering columns; Grouping; Removing duplicates)
Aggregating Data
(dplyr functions; data.table functions)
Combining Data Frames
(Binding by rows; Merging by columns; Joining tables)
Reshaping Data from Long/Wide to Wide/Long Formats
(spread(); gather(); pivot_wider(); pivot_longer(); dcast(); melt())
Spreading Rows
(Filling in values; Replicating rows)
Filling in Missing Values with Previous or Next Value
(tidyr::fill(); zoo::na.locf())
Duplicates
(Finding and marking duplicates; Finding the positions of duplicates; Removing duplicates)
Dates and Times
Dates and Times Fundamentals
(Data types; Converting dates and times; Creating dates and times; Extracting date-time components; Calculations; Time zones)
R Markdown
Texts
Strings
(Regular expressions; Pattern searching, matching and replacement; grep(), grepl(); sub(), gsub(); stringr functions)
video tutorials
Visualization
A Lot of Bars
(Stacked bars (count); Stacked bars (percentage); Grouped bars; Lollipop chart)
Grouping in Plotting
(Coloring; Facets; Grouped bars; Combining graphs)
Web-interfacing Visualization with Shiny App
Project I: Exploring multiple dimensions of survey data
-
Part I: The Dirty Work - Reshaping Data for Visualization
(Reshaping data structures; Extracting strings; Automating for Shiny) -
Part II: The Jigsaw Puzzle Pieces - Creating Graphs with ggplot2
(Bars; Summary stats; Organizing data; Visually grouping data) -
Part III: Assembling the Pieces - Creating R Shiny App
(User interface layout; Widgets; Reactive expressions; Plot outputs; Table outputs; Style; Hosting app) -
Product: Shiny App
(Source: library user survey data)
Project II: Visualizing times and locations with animation and interactivity
-
Part I: Creating Animated Graphs with gganimate
(gganimate; Animated map; Animated line graph) -
Part II: The Shiny App
(Slider; Animation sequences) -
Product: Shiny App
(Source: user behavior logs / server events data)
Working with SQL in Shiny
Project I: Building a one-stop-shop web app for business intelligence
-
Connecting SQLite Database and Shiny App for Business Intelligence
(Compiling database queries with SQLite; Issuing queries with RSQLite; Embedding SQLite queries in Shiny components) - Product: Business Intelligence Dashboard
Project II: Buildng a prototype of a database management system
-
Creating a Shiny App for Database Management
(Dashboard layout; Authentication; Dynamic UI reacting to user inputs; Making sure the SQL parts work in Shiny; Web development in Shiny) - Product: Database Management Platform