更新时间:2021-07-23 16:58:44
封面
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()
Using Different Bar Chart Aesthetic Options
Facet Wrapping and Gridding
Utilizing Facet Wrapping and Gridding to Visualize Data Effectively
Boxplot + coord_flip()
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
Data Management
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