write_registry: write_registry

View source: R/write_registry.R

write_registryR Documentation

write_registry

Description

Saves the data of the proided registry structure.

Usage

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

Arguments

structure

structure type. One of category-scheme, codelist, concept-scheme, dataflow, data-structure, memberlist, consumption-agreement, or provision-agreement

x

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 (http://econdata.co.za) is required to use this function. The user must provide an API token that can be found on the Account page of the online portal, a GUI dialog will prompt the user for their API token. Credentials can also be supplied by setting the ECONDATA_CREDENTIALS environment variable using the syntax: "client_id;client_secret", e.g. Sys.setenv(ECONDATA_CREDENTIALS="client_id;client_secret"), when available.

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 Nov. 1, 2024, 5:41 a.m.