Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Title Page
Copyright and Credits
R Programming Fundamentals
Packt Upsell
Why Subscribe?
Packt.com
Contributors
About the Author
Packt is Searching for Authors Like You
Preface
Who This Book is for
What This Book Covers
To Get the Most Out of This Book
Download the Example Code Files
Conventions Used
Get in Touch
Reviews
Introduction to R
Using R and RStudio, and Installing Useful Packages
Using R and RStudio
Executing Basic Functions in the R Console
Setting up a New Project
Installing Packages
Activity: Installing the Tidyverse Packages
Variable Types and Data Structures
Variable Types
Numeric and Integers
Character
Dates
Activity: Identifying Variable Classes and Types
Data Structures
Vectors
Lists
Matrices
Dataframes
Activity: Creating Vectors, Lists, Matrices, and Dataframes
Basic Flow Control
If/else
For loop
While loop
Activity: Building Basic Loops
Data Import and Export
Excel Spreadsheets
Activity: Exporting and Importing the mtcars Dataset
Getting Help with R
Package Documentation and Vignettes
Activity: Exploring the Introduction to dplyr Vignette
RStudio Community, Stack Overflow, and the Rest of the Web
Summary
Data Visualization and Graphics
Creating Base Plots
The plot() Function
Factor Variables
Model Objects
Plotting More Than One Plot at a Time
Creating and Plotting a Linear Model Object
Titles and Axis Labels
Changing the Color of Base Plots
Activity: Recreating Plots with Base Plot Methods
ggplot2
ggplot2 Basics
Histogram
Creating Histograms using ggplot2
Bar Chart
Creating a Bar Chart with ggplot2 using Two Different Methods
Scatterplot
Creating a Scatterplot of Two Continuous Variables
Boxplot
Creating Boxplots using ggplot2
Activity: Recreating Plots Using ggplot2
Digging into aes()
Bar Chart
Using Different Bar Chart Aesthetic Options
Facet Wrapping and Gridding
Utilizing Facet Wrapping and Gridding to Visualize Data Effectively
Boxplot + coord_flip()
Scatterplot
Utilizing Different Aesthetics for Scatterplots, Including Shapes, Colors, and Transparencies
Activity: Utilizing ggplot2 Aesthetics
Extending the Plots with Titles, Axis Labels, and Themes
Interactive Plots
Plotly
Shiny
Exploring Shiny and Plotly
Summary
Data Management
Factor Variables
Creating Factor Variables in a Dataset
Using ifelse() Statements
Using the recode() Function
Examining and Changing the Levels of Pre-existing Factor Variables
Creating an Ordered Factor Variable
Activity: Creating and Manipulating Factor Variables
Summarizing Data
Data Summarization Tables
Tables in R
Creating Different Tables Using the table() Function
Using dplyr Methods to Create Data Summary Tables
Activity: Creating Data Summarization Tables
Summarizing Data with the Apply Family
Using the apply() Function to Create Numeric Data Summaries
Activity: Implementing Data Summary
Splitting, Combining, Merging, and Joining Datasets
Splitting and Combining Data and Datasets
Splitting and Unsplitting Data with Base R and the dplyr Methods
Splitting Datasets into Lists and Then Back Again
Combining Data
Combining Data with rbind()
Combining Matrices of Objects into Dataframes
Splitting Strings
Using stringr Package to Manipulate a Vector of Names
Combining Strings Using Base R Methods
Activity: Demonstrating Splitting and Combining Data
Merging and Joining Data
Demonstrating Merges and Joins in R
Activity: Merging and Joining Data
Summary
Solutions
Chapter 1: Introduction to R
Activity: Installing the Tidyverse Packages
Activity: Identifying Variable Classes and Types
Activity: Creating Vectors, Lists, Matrices, and Dataframes
Activity: Building Basic Loops
Activity: Exporting and Importing the mtcars Dataset
Activity: Exploring the Introduction to dplyr Vignette
Chapter 2: Data Visualization and Graphics
Activity: Recreating Plots with Base Plot Methods
Activity: Recreating Plots Using ggplot2
Activity: Utilizing ggplot2 Aesthetics
Chapter 3: Data Management
Activity: Creating and Manipulating Factor Variables
Activity: Creating Data Summarization Tables
Activity: Implementing Data Summary
Activity: Demonstrating Splitting and Combining Data
Activity: Merging and Joining Data
Other Books You May Enjoy
Leave a Review - Let Other Readers Know What You Think
← Prev
Back
Next →
← Prev
Back
Next →