write_registry: write_registry

View source: R/write_registry.R

write_registryR Documentation

write_registry

Description

Saves the data of the provided registry structure.

Usage

write_registry(structure, x, method = "update", ...)

Arguments

structure

character. (Metadata structure type.) One of "category-scheme", "codelist", "concept-scheme", "dataflow", "data-structure", "memberlist", "consumption-agreement", or "provision-agreement".

x

list. Registry structure to upload.

method

Desired method. One of create or update. create will create a new registry structure with the provided metadata. update (default) will update an existing structure in the registry.

...

Further optional arguments:

file character. File name for saving data set as ODS spreadsheet to disk.

Details

An EconData account is required to use this function. The user must provide an API token, which can be found on the Account page of the online portal. A GUI dialog will prompt the user for their API token.

The functionality provided by write_registry is to save the registry structure according to the function arguments. As this makes modifications to the registry, the user calling this function requires admin privileges.

Value

No return value, called for side-effects—writes data to server.

See Also

read_registry

Examples

## Not run: 
x <- read_registry("codelist", id = "CL_FREQ")

tmp <- tempdir()

write_registry(x, file = file.path(tmp, "frequency.ods"))

## End(Not run)

coderaanalytics/econdatar documentation built on Feb. 19, 2025, 10:37 p.m.