Skip to contents

Returns the documentation files (codebooks, questionnaires and reports) deposited with a study.

Usage

get_codebook_files(
  srvy = NULL,
  codebook = NULL,
  file = NULL,
  quiet = FALSE,
  refresh = FALSE
)

get_qes_codebook_files(
  srvy = NULL,
  codebook = NULL,
  file = NULL,
  quiet = FALSE,
  refresh = FALSE
)

Arguments

srvy

A qesR survey code. Required if codebook is NULL.

codebook

A qes_codebook object. Its study is used when it records one; otherwise the file manifest attached to it is returned.

file

Ignored: documents do not depend on which data file is read.

quiet

If TRUE, suppress informational output.

refresh

Ignored: the list comes from the catalog shipped with qesR.

Value

A data frame of codebook/support files with the columns file_id, filename, extension, size and download_url.

Details

Soft-deprecated: use qes_docs(). get_codebook_files() and get_qes_codebook_files() keep working and will not be removed; each prints a one-time notice (see qesR-deprecated). They return every document deposited with the study from the offline catalog, with the qesR 0.4.4 columns, and make no network request. file and refresh no longer change the result.

Examples

get_codebook_files(srvy = "qes2022")
#>   file_id                                   filename extension   size
#> 1 7449514 2022 Quebec Election Study Codebook v1.pdf       pdf 663655
#>                                                download_url
#> 1 https://dataverse.harvard.edu/api/access/datafile/7449514