generated from DACSS/course_blog_template_old
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathstudents.Rmd
31 lines (24 loc) · 842 Bytes
/
students.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
---
title: "Students"
site: distill::distill_website
---
```{r echo=FALSE, message=FALSE, warning=FALSE}
####################################################
# Keep this code chunk to keep homepage up-to-date #
####################################################
# List of students in users folder
students <- list.files('users', '*.Rmd', recursive = TRUE)
out <- NULL
# Goes through each student
for (student in students) {
# Name of students
name <- sub('.Rmd', '', student)
# HTML extension of students
html <- paste(name, '.html', sep = '')
html <- sub(' ', '-', html)
# Dynammically creates student names and corresponding links
out <- c(out, knitr::knit_expand(text = '- [{{name}}]({{html}})'))
}
# Below pastes created student list when file is knitted
```
`r paste(knitr::knit(text = out), collapse = '\n')`