norman_api_definitions: Norman API Definitions (Dictionary)

View source: R/norman_api_definitions.R

norman_api_definitionsR Documentation

Norman API Definitions (Dictionary)

Description

This function provides the norman API definitions. It assigns a list structure that acts as a dictionary, allowing for auto-completion (Intellisense) in RStudio when accessing modules and parameters.

Usage

norman_api_definitions(path = NULL)

Arguments

path

A character string specifying the path to the JSON file. If NULL, it attempts to locate 'api_definitions.json' within the package's 'extdata' directory.

Value

A named list (dictionary) containing two main sections:

  • modules: A list where names are module names (e.g., susdat) and values are character vectors of allowed parameters.

  • parameters: A list where names are parameter keys and values are their English descriptions.

  • patterns: A collection of common regular expression patterns used for splitting or filtering data

Examples

## Not run: 
  # 1. Load the definitions
  defs <- load_api_definitions()

  # 2. Access available modules (RStudio will trigger auto-complete after $)
  # defs$modules$Substance

  # 3. Access parameter descriptions
  # defs$parameters$`Country Alpha-2 code`

## End(Not run)


normanR documentation built on Sept. 12, 2026, 5:10 p.m.