Training Manual
Welcome
Lesson Materials
Software-Carpenty
Data-Carpentry
The Carpentries
DataCamp
R for Data Science
I Project setup
1
Infrastructure
1.1
Project Template
2
Documentation and Metadata
2.1
Code documentaion
2.1.1
lintr
2.2
Metadata
2.3
README files
2.3.1
Example File
II Version Control
3
Version Control
3.1
Git
3.2
Git setup
3.3
Git on your own
3.4
Working with remotes
3.5
Git with branches
3.6
Collaborating with Git
3.7
Protecting branches
3.8
Help! (FAQ)
3.8.1
General workflow
3.8.2
Git push rejected (master)
3.8.3
Accidently did work on
master
:
3.8.4
Get changes from master on your branch
3.8.5
Remote server (e.g., GitLab, GitHub, Bitbucket, etc) shows merge conflict
3.8.6
Remove data/files from history
III RStudio
4
RStudio
4.1
Restarting RStudio Session
4.1.1
Within RStudio
4.1.2
From the terminal
4.2
Accessing folders
4.2.1
Outside of Home
IV R
5
Functions
5.1
Writing Functions
5.1.1
Fahrenheit to Kelvin
5.1.2
Kelvin to Celsius
5.1.3
Fahrenheit to Celsius
5.2
Testing Functions
5.3
Exercise
5.4
Checking values
5.5
dot-dot-dot …
6
Conditionals
6.1
if statements
6.2
If else statements
6.3
Dealing with NA
6.4
Fizzbuzz
6.4.1
Vectorized conditionals
6.4.2
Multiple conditions
6.5
Exercise
7
Iteration
7.1
Broadcasting
7.2
For loops
7.2.1
Pre allocating in a loop
7.3
purrr (map)
7.3.1
Exercise
7.4
Fitting models
7.5
Apply (in base R)
7.5.1
lapply
7.5.2
sapply
7.5.3
vapply
7.5.4
mapply
7.5.5
apply (2-dimensions)
7.6
Safely dealing with failure
7.7
Possibly and quietly succeeds
7.8
Mapping over different arguments
7.9
Exercise
7.10
Walk
7.11
Other predicates
V Modeling
8
Linear Models
8.1
Fit a linear model
8.1.1
Base R
8.1.2
Tidymodels
8.2
Predict
8.3
Error metrics
8.4
Train Test Split
8.5
Exercise
8.5.1
Solution
9
Workflows
9.1
Update formula
9.2
Update Model
9.3
Get workflow components
10
Purrr + tidymodel objects
10.1
Exercise: Train on split data
10.2
Pass the split object
10.3
Question
10.4
Exercise
10.5
map
functions
10.6
Exercise
10.7
unnest
11
Other models
11.1
Exercise
11.1.1
Solution
11.2
Decision trees
11.3
KNN
11.4
Selecting your metrics
12
Recipes
12.1
PCA
12.1.1
Prep/bake
12.1.2
Dummy variables
12.1.3
Step novel
12.1.4
remove 0 variance
12.1.5
PCA
12.2
Exercise
12.2.1
Solution
12.3
Put it all together
12.3.1
Solution
VI Publishing + Communication
13
RMarkdown
13.1
html
13.2
pdf
13.3
word
13.4
powerpoint
13.5
ioslides
13.6
beamer
13.7
tufte
13.8
rolldown
13.9
rticles
13.10
flexdashboard
13.11
pagedown
13.12
bookdown
13.13
learnr
14
Bookdown
14.1
Components of a book
14.1.1
Section titles:
14.2
Rendering M-K vs K-M
14.3
Looking at the book while you work
14.4
Figures
14.5
Tables
14.6
Cross refrence chapters
References
Published with bookdown
Training Manual
13.12
bookdown
bookdown::gitbook: default