-
Notifications
You must be signed in to change notification settings - Fork 1
/
asyllabus.Rmd
120 lines (108 loc) · 3.27 KB
/
asyllabus.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
title: "2021 Schedule"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(kableExtra)
```
---
```{r child="list_of_labs.Rmd", include=FALSE}
```
```{r child="list_of_lectures.Rmd", include=FALSE}
```
```{r generate_dates, include=FALSE}
## first day of class
start_date <- as.Date("2021-01-05")
## all tues
tues <- seq.Date(from = start_date, by = 7, length.out = 10)
## all thur
thur <- tues + 2
## all qtr
qtr <- sort(c(tues, thur))
qtr <- sub("0(\\d)", "\\1", format(qtr, "%d %b"))
```
```{r weeks, include = FALSE}
week_lecs <- list(d1 = intro,
d2 = ts_basics,
d3 = arma_basics,
d4 = forecast,
d7 = uni_ss,
d8 = marss,
d5 = marss_covariates,
d12 = dfa,
d10 = dlm,
d11 = HMMs,
d13 = bayes,
d16 = bayes2,
d9 = model_inf,
d15 = interactions1,
d17 = EDM,
d6 = freqdomain,
d14 = spatial,
d18 = spatial2,
d19 = present1,
d20 = present2
)
```
```{r week_labs, include = FALSE}
week_labs <- list(d1 = matrixlab,
d2 = lmlab,
d3 = "",
d4 = forecastlab,
d5 = "",
d6 = sslab2,
d7 = "",
d8 = dfalab,
d9 = "",
d10 = dlmlab,
d11 = "",
d12 = bayeslab,
d13 = "",
d14 = hmmlab,
d15 = "",
d16 = edmlab,
d17 = "",
d18 = spatiallab,
d19 = "",
d20 = presentlab
)
```
```{r lecture_topics2, include = FALSE}
lec_topics <- lapply(week_lecs, function(x){if(is.list(x)){x$topics}else{""}})
## topics formatted for html
lec_topics_html <- sapply(lapply(lec_topics, paste, "<br>", collapse=""), c)
names(lec_topics_html) <- NULL
```
```{r lab_topics2, include = FALSE}
lab_topics <- lapply(week_labs, function(x){if(is.list(x)){x$topics}else{""}})
## topics formatted for html
lab_topics_html <- sapply(lapply(lab_topics, paste, "<br>", collapse=""), c)
names(lab_topics_html) <- NULL
```
```{r hw_topics, include = FALSE}
hw_topics <- lapply(week_labs, function(x){if(is.list(x)){c(x$hw_topics,x$hw_duedate)}else{""}})
## topics formatted for html
hw_topics_html <- sapply(lapply(hw_topics, paste, "<br>", collapse=""), c)
names(hw_topics_html) <- NULL
```
```{r generate_syllabus, echo=FALSE}
## data frame with dates & topics
syl_txt <- data.frame(
date = qtr,
lec_topics = lec_topics_html,
lab_topics = lab_topics_html,
hw_topics = hw_topics_html
)
colnames(syl_txt) <- c("Date", "Lecture topics", "Lab topics", "Homework")
## generate table
kable(syl_txt, format = "html", caption = " ", escape = FALSE) %>%
kable_styling(bootstrap_options = "striped",
full_width = F,
position = "left") %>%
column_spec(1, width = "8em") %>%
column_spec(2, width = "27em")
```
```{r echo=FALSE}
save(qtr, week_lecs, week_labs, file="syllabus.RData")
```