-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-datasets.qmd
33 lines (27 loc) · 974 Bytes
/
app-datasets.qmd
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
# Datasets {#datasets}
You can download a [zip file of the datasets](data/data.zip). Each data table comes with a codebook in [Psych-DS](https://psych-ds.github.io/) JSON format.
```{r, echo = FALSE, results='asis'}
f <- list.files("data", "\\.json", full.names = T)
d <- list.files("data", "\\.(csv|xls)", full.names = T)
d <- d[!grepl("5factor.x", d)]
d <- d[!grepl("demo.x", d)]
# listitems <- lapply(f, function(x) {
# txt <- readLines(x)
# fname <- gsub("^# ", "", txt[1])
# fname <- gsub(" ----", "", fname)
# idx <- grep(paste0("^data/", fname, "\\."), d)
# url <- d[idx]
# nm <- gsub("^#' ", "", txt[2])
# desc <- gsub("^#' ", "", txt[4])
# desc <- gsub(" * ", "\n ", desc)
# sprintf("* [%s](%s) %s",
# nm, url, desc)
# })
listitems <- lapply(d, function(x) {
url <- x
nm <- gsub("^data\\/", "", x)
sprintf("* [%s](%s)",
nm, url)
})
cat(paste(unlist(listitems), collapse = "\n"))
```