-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlectures.Rmd
142 lines (117 loc) · 4.76 KB
/
lectures.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: "Lecture presentations"
output: html_document
---
<br>
### Meeting days & times
Tuesday & Thursday from 10:00-11:20 FISH 213
<br>
#### Navigating through a slide deck
Here are some navigation tricks for slide decks in `.html` format.
* Use the arrow keys (←/→) on your keyboard to go forward or backward
* Press the "o" key on any slide to show you an overview of the slide deck
* In overview mode, click on a slide or press "esc" to zoom in on it
```{r child = "_timeline.Rmd", include = FALSE}
```
```{r child = "_list_of_lectures.Rmd", include = FALSE}
```
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(kableExtra)
```
```{r weeks, include = FALSE}
week_lecs <- list(d1 = intro,
d2 = ts_basics,
d3 = arma_basics,
d4 = forecast, # lab
d7 = uni_ss,
d8 = marss, # lab
d5 = marss_covariates,
d12 = dfa, # lab
d10 = dlm,
d11 = HMMs, # lab
d13 = bayes,
d16 = bayes2, # project methods
d9 = model_inf,
d6 = review_session, # lab
d14 = spatial,
d18 = spatial2, # lab no hw
d15 = freqdomain,
d17 = interactions1,
d19 = present1,
d20 = present2
)
```
```{r lecture_topics, 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
```
<!-- 1st is pdf, 2nd html, 3rd Rmd -->
```{r lec_links, include = FALSE}
lec_links1 <- lapply(week_lecs, function(x){if(is.list(x)){c(x$rmd)}else{""}})
lec_links1_html <- sapply(lapply(lec_links1, function(x){
tmp1<-paste0("[Rmd ",1:length(x),"]("); tmp2 <- ")"; tmp <- paste(tmp1,x,tmp2); tmp[x==""]=""; tmp=paste(tmp, collapse=" "); tmp}), c)
lec_links2 <- lapply(week_lecs, function(x){if(is.list(x)){c(x$pdf)}else{""}})
lec_links2_html <- sapply(lapply(lec_links2, function(x){
tmp1<-paste0("[pdf ",1:length(x),"]("); tmp2 <- ")"; tmp <- paste(tmp1,x,tmp2); tmp[x==""]=""; tmp=paste(tmp, collapse=" "); tmp}), c)
lec_links3 <- lapply(week_lecs, function(x){if(is.list(x)){c(x$html)}else{""}})
lec_links3_html <- sapply(lapply(lec_links3, function(x){
tmp1<-paste0("[html ",1:length(x),"]("); tmp2 <- ")"; tmp <- paste(tmp1,x,tmp2); tmp[x==""]=""; tmp=paste(tmp, collapse=" "); tmp}), c)
lec_links_html <- lec_links3_html
for(i in 1:length(lec_links3_html)){
lec_links_html[i] <- paste(lec_links2_html[i], lec_links3_html[i], lec_links1_html[i], sep="<br>")
}
names(lec_links_html) <- NULL
```
```{r video_links, include = FALSE}
vid_links <- lapply(week_lecs, function(x){if(is.list(x)){x$video}else{""}})
## topics formatted for html
vid_links_html <- sapply(lapply(vid_links, function(x){
if(length(x>1)) tmp1 <- paste0("[Video ",1:length(x),"](") else tmp1 <- "[Video]("
tmp2 <- ")"
tmp <- paste(tmp1,x,tmp2); tmp[x==""]=""
tmp=paste(tmp,collapse="<br>"); tmp}), c)
names(vid_links_html) <- NULL
```
```{r youtube_links, include = FALSE}
youtube_links <- lapply(week_lecs, function(x){
if(is.list(x)){x$youtube}else{""}})
## topics formatted for html
youtube_links_html <- sapply(lapply(youtube_links, function(x){ tmp1<-"[YouTube]("; tmp2 <- ")"; tmp <- paste(tmp1,x,tmp2); tmp[x==""]=""; tmp=paste(tmp,collapse="<br>"); tmp}), c)
names(youtube_links_html) <- NULL
```
```{r reading_links, include = FALSE}
reading_links <- lapply(week_lecs, function(x){if(is.list(x)){x$reading}else{""}})
## topics formatted for html
reading_links_html <- sapply(lapply(reading_links, paste, "<br>", collapse=""), c)
names(reading_links_html) <- NULL
```
```{r instructors, include = FALSE}
instructors <- lapply(week_lecs, function(x){if(is.list(x)){x$instructor}else{""}})
## topics formatted for html
instructor_html <- sapply(lapply(instructors, paste, "<br>", collapse=""), c)
names(instructor_html) <- NULL
```
```{r generate_table, echo=FALSE}
## data frame with dates & topics
syl_txt <- data.frame(
date = qtr,
instructor = instructor_html,
lec_topics = lec_topics_html,
lec_links = lec_links_html,
vid_links = vid_links_html,
reading_links = reading_links_html
)
colnames(syl_txt) <- c("Date", "Instructor", "Lecture topics",
"Slides", "Video of Lecture", "Reading")
## generate table
kable(syl_txt, format = "html", caption = " ",
align = "cclccc", escape = FALSE) %>%
kable_styling(bootstrap_options = "striped",
full_width = F,
position = "left") %>%
column_spec(c(1,2), width = "4em") %>%
scroll_box(height = "700px", extra_css = "border-style: none;")
```