Skip to main content
DoSS Toolkit
Show table of contents
Table of contents
1
Preface
Hello World!
2
Introduction
3
Getting and setting up RStudio
4
Getting to know what is what
5
Hello World!
6
Hello World, again!
7
Hello World, yet again!
8
The R community
Operating in an error prone world
9
Introduction
10
Getting help is normal!
11
Using Google and Stack Overflow
12
Even more on Stack Overflow
13
When your code doesn’t work
14
Making reproducible examples
15
How to make the most of R’s cryptic error messages
Holding the chaos at bay
16
Introduction
17
R Projects and working directory
18
Folder set-up
19
Writing comments
20
Installing packages
21
Install from GitHub
22
Calling packages
23
How to update packages
24
Read CSVs
25
Reading tables dta and other data types
Hand me my plyrs
26
Introduction
27
What is the tidyverse?
28
The pipe
29
select
30
filter
31
group and ungroup
32
summarise
33
arrange
34
mutate
35
Pivoting data from long to wide and vice versa
36
rename
37
Counting
38
slice
39
Representations of data
40
length, rows, columns and dimensions
Totally addicted to base
41
Introduction
42
mean, median, sd, lm, and summary
43
Generalized linear models with glm
44
Mixed-effect linear models with lme4
45
function
46
for and while
47
if, if else and case when
48
c, seq, seq along, and rep
49
hist, plot and boxplot
50
apply, sapply, and lapply
51
File creation and manipulation
52
sum round etc
53
Investigating and playing with data
54
row and column names
55
floor(), ceiling(), round(), and abs()
He was a d8er boi
56
Introduction
57
head, tail, glimpse and summary
58
paste, paste0, glue and stringr
59
names, rbind and cbind
60
Joins
61
Looking for missing data
62
setseed, runif, rnorm, and sample
63
Simulating datasets for regression
64
Conditional mutating and summarising
65
Tidying up datasets
66
pull, pluck and unnest
67
forcats and factors
68
More on strings
69
Working with dates
70
Regular expressions
71
janitor
To ggplot or not to ggplot
72
Introduction
73
Overview of ggplot2
74
Histograms
75
Scatter plots
76
Various useful options
77
Saving graphs
78
gganimate
79
Some other geom
80
other geoms 2
81
Examples
82
Exercises
83
Exercise 1
84
Exercise 2
85
Exercise 3
86
Exercise 4
R Marky Markdown and the Funky Docs
87
Introduction
88
Introduction to R Markdown
89
Top Matter: Title, Date, Author, Abstract
90
Tables: kable, kableextra, and gt
91
Multiple plots with patchwork
92
References and Bibtex
93
PDF outputs
94
here and filepaths
Git outta here
95
Introduction
96
What is version control and GitHub?
97
Git: pull, status, add, commit, push
98
Branches in GitHub
99
Dealing with conflicts
100
Putting (G)it All together in RStudio
101
Projects issues
Indistinguishable from magic
102
Introduction
103
Iteration
104
Coding style
105
Static maps using ggmap
106
Writing R Packages
107
Writing R Packages II
108
Getting started with Blogdown
109
Distill and postcards
110
Getting started with Shiny
111
tidymodels
View book source
52
sum round etc
Written by ADD NAME and last updated on ADD DATE.
52.1
Introduction
52.2
Exercises
52.2.1
Question 1
52.2.2
Question 2
52.2.3
Question 3
52.2.4
Question 4
52.2.5
Question 5
52.2.6
Question 6
52.2.7
Question 7
52.2.8
Question 8
52.2.9
Question 9
52.2.10
Question 10
51
File creation and manipulation
53
Investigating and playing with data
On this page
52
sum round etc
52.1
Introduction
52.2
Exercises
52.2.1
Question 1
52.2.2
Question 2
52.2.3
Question 3
52.2.4
Question 4
52.2.5
Question 5
52.2.6
Question 6
52.2.7
Question 7
52.2.8
Question 8
52.2.9
Question 9
52.2.10
Question 10
View source
Edit this page