Suvival Guide
Preface
1
How to use this guide
1.1
Download the data
1.2
Following along
1.3
Error messages
1.3.1
Function not found
1.3.2
Object not found
2
Getting Started with R and RStudio
2.1
Installing the software
2.2
The RStudio Interface
2.3
Code chunks
2.3.1
Writing and executing
2.3.2
Commenting with #
2.4
R Packages
2.4.1
Installing packages
2.4.2
Loading packages for use
2.5
Setting a directory
2.6
Getting help with R
3
Basics of R Programming
3.1
Thinking like R
3.2
Objects
3.3
Functions in R
3.4
The Pipe Operator
4
Working with data
4.1
Importing data
4.1.1
R data (.rdata)
4.1.2
Delimited (.csv) files
4.1.3
Excel (.xls, .xlsx) files
4.1.4
Stata (.dta) or SPSS (.sav) files
4.2
A first look at your data
4.3
Referencing variables of a data frame
4.4
Saving your work
4.4.1
Saving an R script
4.4.2
Saving a data frame
5
Descriptive statistics
5.1
Describing one variable
5.1.1
Summary statistics
5.1.2
Graphing the distribution
5.1.3
Testing hypotheses
5.2
Omitting missing values
5.3
Group comparisons
5.3.1
Summary statistics by group
5.3.2
Visualize group differences
5.3.3
Testing hypotheses
6
Frequency and cross tabulation
6.1
Describing one variable
6.1.1
Frequency tables
6.1.2
Bar charts
6.2
Cross-tabulation
7
Regression analysis
7.1
Correlation
7.2
OLS regression
7.3
Scatter with linear fit
7.4
Logistic regression
7.5
Making regression tables
8
Doing more with data frames
8.1
Filter/subset data
8.2
Selecting your variables
8.3
Create new variables
8.4
Appending and merging data
8.4.1
Appending new cases
8.4.2
Merging
9
Basic visualization
9.1
Graphing in base R
9.1.1
Describe one variable
9.1.2
Visualizing relationships
9.2
Professional formatting
9.2.1
Titles and labels
9.2.2
Axis options
9.2.3
Graphical parameters
9.3
Exporting/saving graphs
Published with bookdown
Survival Guide: Conquering R and living through SIS 600
Chapter 3
Basics of R Programming