-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise_solutions.Rmd
87 lines (63 loc) · 2.77 KB
/
exercise_solutions.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: "Exercise Solutions"
output:
html_document:
toc: false
---
```{r setup-alex, echo=FALSE, purl = FALSE}
library(knitr)
library(stringr)
knitr::opts_chunk$set(message=FALSE, warning=FALSE, eval=TRUE, echo=FALSE)
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(stringr))
source('reveal.R')
```
Follow the links below for solutions to each of the exercises you have completed on this course. Click on the 'code' buttons to reveal the R code associated with each question. If you would prefer these solutions as R scripts for later offline use then you can [find these here](course_code.html).
\
### Day 1
```{r sol_GDE, results='asis', eval=isTRUE(show_text_GDE)}
link_name <- "Graphical data exploration exercise"
file_name <- "graphical_data_exploration_exercise_solutions.html"
paste0("- [", link_name, "](", file_name, ")") %>%
cat(sep="\n\n")
```
\
### Day 2
```{r sol_lm1, results='asis', eval=isTRUE(show_text_lm1)}
link_name <- "Linear model with single continuous explanatory variable exercise"
file_name <- "linear_model_1_exercise_solutions.html"
paste0("- [", link_name, "](", file_name, ")") %>%
cat(sep="\n\n")
```
\
### Day 3
```{r sol_lm2, results='asis', eval=isTRUE(show_text_lm2)}
link_name <- "Linear model with single categorical explanatory variable exercise"
file_name <- "linear_model_2_exercise_solutions.html"
paste0("- [", link_name, "](", file_name, ")") %>%
cat(sep="\n\n")
```
```{r sol_lm3, results='asis', eval=isTRUE(show_text_lm3)}
link_name <- "Linear model with categorical and continuous explanatory variables exercise"
file_name <- "linear_model_3_exercise_solutions.html"
paste0("- [", link_name, "](", file_name, ")") %>%
cat(sep="\n\n")
```
\
### Day 4
```{r sol_lm4, results='asis', eval=isTRUE(show_text_lm4)}
link_name <- "Linear model selection exercise"
file_name <- "linear_model_4_exercise_solutions.html"
paste0("- [", link_name, "](", file_name, ")") %>%
cat(sep="\n\n")
```
\
[Offline R scripts](course_code.html)
```{r code-out, include=FALSE}
# TODO: generate list automagically
knitr::purl('./graphical_data_exploration_exercise_solutions.Rmd', output = './exercise_solutions/graphical_data_exploration_exercise_solutions.R', quiet = TRUE)
knitr::purl('./linear_model_1_exercise_solutions.Rmd', output = './exercise_solutions/linear_model_1_exercise_solutions.R', quiet = TRUE)
knitr::purl('./linear_model_2_exercise_solutions.Rmd', output = './exercise_solutions/linear_model_2_exercise_solutions.R', quiet = TRUE)
knitr::purl('./linear_model_3_exercise_solutions.Rmd', output = './exercise_solutions/linear_model_3_exercise_solutions.R', quiet = TRUE)
knitr::purl('./linear_model_4_exercise_solutions.Rmd', output = './exercise_solutions/linear_model_4_exercise_solutions.R', quiet = TRUE)
```