mdl_survey_import_ddi: Create survey from DDI file

View source: R/survey.R

mdl_survey_import_ddiR Documentation

Create survey from DDI file

Description

Imports a DDI XML file and its metadata creating a new survey.

Usage

mdl_survey_import_ddi(
  xml_file,
  rdf_file = NULL,
  enum_collection,
  enum_survey_access_policy,
  data_remote_url = NULL,
  published = FALSE,
  overwrite = FALSE
)

Arguments

xml_file

Path to the DDI XML file.

rdf_file

Path to the RDF file.

enum_collection

The ID of the collection where the survey will be created. To see an up to date list of collections call mdl_collection_list().You can also use the corresponding enumerator, e.g.: mdl_enum_collection$WestAfrica

enum_survey_access_policy

Specifies the access level to the data files. You can use the corresponding enumerator, e.g.: mdl_enum_survey_access_policy$'Licensed use files'

data_remote_url

Link to the data files, in case enum_survey_access_policy is set to remote (link to external repository).

published

The survey status: FALSE for draft, TRUE for published.

overwrite

Specifies if the survey will be overwritten in case it already exists: FALSE for not overwriting, TRUE for overwriting. If a survey with the same idno already exists and the argument is set to FALSE, the survey will not change and an error will be returned.

Value

API call response


UNHCRmdl/mdl documentation built on Jan. 15, 2025, 6:40 p.m.