Learn R Programming

nettskjemar (version 1.0.1)

ns_get_form_reports: Download files associated with a form

Description

Each Nettskjema form has several auxiliary forms that can be retrieved.

Usage

ns_get_form_reports(
  form_id,
  type = c("csv", "excel", "spss"),
  path = report_path(form_id, type)
)

Value

httr2-response

Arguments

form_id

integer. Number of the form to retrieve

type

Character. Either "csv", "excel" or "spss".

path

Character. Full path to where the downloaded file should be saved. Defaults to current directory with correct extension.

Examples

Run this code
if (FALSE) {
ns_get_form_reports(10009, type="csv")
ns_get_form_reports(10009, type="excel")
ns_get_form_reports(10009, type="spss")
ns_get_form_reports(
  10009,
  type="spss",
  path = "~/Desktop/10009/form.sav"
)
}

Run the code above in your browser using DataLab