get_element_codetables: Get metadata about code tables for the "elements" resource

Description Usage Arguments Value Examples

View source: R/get_elements_code_tables.R

Description

get_element_codetables() retrieves metadata about code tables. A code table defines a small number of discrete values for an element. The function requires input for client_id. The other function arguments are optional, and default to NULL, which means that the response from the API is not filtered on these parameters.

Usage

1
2
3
4
5
get_element_codetables(client_id,
                       ids = NULL,
                       fields = NULL,
                       language = NULL,
                       return_response = FALSE)

Arguments

client_id

A string. The client ID to use to send requests to the Frost API.

ids

A character vector. The element IDs to get metadata for.

fields

A character vector. The field to include in the response (i.e. output). If this parameter is set, then only the specified field is returned as a data frame. If not set, then all fields will be returned in the response as a list. The options are "summarized" and "details".

language

A string. The language of the fields in the response. The options are "en-US" (default), "nb-NO" (Norwegian, Bokmål), and "nn-NO" (Norwegian, Nynorsk).

return_response

A logical. If set to TRUE, then the function returns the response from the GET request. If set to FALSE (default), then the function returns a tibble (data frame) of the content in the response.

Value

The function returns either a data frame with metadata about code tables, or the response of the GET request, depending on the boolean value set for return_response.

Examples

1
2
3
4
5
6
7
## Not run: 
frost_client_id <- "<YOUR FROST CLIENT ID>"

# Get the full code table
code_tables <- get_element_codetables(client_id = frost_client_id)

## End(Not run)

PersianCatsLikeToMeow/frostr documentation built on Aug. 6, 2020, 7:15 p.m.