Datasets {#datasets}

You can download a zip file of the datasets or access them from the class package with getdata(). The help files for each data table describe the data and each column. Each data table comes with a codebook in Psych-DS format.

f <- list.files("../R", "data_.*", full.names = T)
d <- list.files("data", "\\.(csv|xls)", full.names = T)

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)
})

cat(paste(unlist(listitems), collapse = "\n"))


PsyTeachR/reprores-v2 documentation built on Sept. 26, 2022, 10:06 a.m.