-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathreferences.Rmd
More file actions
executable file
·57 lines (51 loc) · 1.83 KB
/
references.Rmd
File metadata and controls
executable file
·57 lines (51 loc) · 1.83 KB
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
---
title: "References"
link-citations: true
csl: apa.csl
output:
html_document:
include:
in_header: ./html/header_references.html
bibliography: "data/bibliography.bib"
---
On this page, we list the references from the datasets. Chapters have their own reference list.
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE)
library(tidyverse)
library(DT)
library(RefManageR)
bib <- ReadBib(file = "data/bibliography.bib")
```
```{r, include=FALSE}
readxl::read_xlsx("data/biblib.xlsx", sheet = "source type and idiom") |>
rowwise() |>
mutate(source = str_c('<a href="#ref-', bibtexkey, '">', Cite(bib, bibtexkey), '</a>'),
language = factor(language),
idiom = factor(idiom),
source_type2 = category,
source_type2 = case_when(source_type2 == "incollection" ~ "chapter",
source_type2 == "phdthesis" ~ "PhD Thesis",
source_type2 == "mastersthesis" ~ "MA Thesis",
source_type2 == "misc" ~ "miscellaneous",
source_type == "dictionary" ~ "dictionary",
source_type == "grammar" ~ "grammar",
TRUE ~ source_type2),
source_type = source_type2,
source_type = factor(source_type)) |>
select(language, idiom, source, source_type) |>
rename(`source type` = source_type) |>
DT::datatable(filter = 'top',
escape = 4,
rownames = FALSE,
options = list(
pageLength = 100,
autoWidth = TRUE,
dom = 'fltpi'))
```
```{r, results = "asis"}
str_c(c("---",
"nocite: |",
str_c(" ", str_c("@", names(bib), collapse = ", ")),
"---"), collapse = "\n") |>
cat()
```