mdl_survey_create: Create survey from metadata list

View source: R/survey.R

mdl_survey_createR Documentation

Create survey from metadata list

Description

Creates or overwrites a survey in the MDL starting from a list containing the survey metadata. The survey created will not include the variables metadata, which should be created afterwards.

Usage

mdl_survey_create(
  survey_metadata_list,
  enum_collection,
  enum_survey_access_policy,
  data_remote_url = NULL,
  published = FALSE,
  overwrite = FALSE
)

Arguments

survey_metadata_list

A list containing the metadata. We recommend to create the list using the function mdl_survey_generate_metadata_list.

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). Use the whole address (including https://) to make it work.

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.