ns_get_form_reports: Download files associated with a form

View source: R/ns-form.R

ns_get_form_reportsR Documentation

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

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.

Value

httr2-response

Examples

## Not run: 
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"
)

## End(Not run)

LCBC-UiO/nettskjemar documentation built on April 11, 2025, 11:01 p.m.