modify_config: Modify Configuration File

View source: R/modify_config.R

modify_configR Documentation

Modify Configuration File

Description

Modifies the configuration file located in the specified root directory of the generated database (config/config.json) by updating values corresponding to the specified keys.

Usage

modify_config(path, keys, new_values, verbose = TRUE)

Arguments

path

[mandatory] (character) The path to the root directory of the generated database.

keys

[mandatory] (list) A list specifying the path to the values in the configuration file that need updating. Each path should correspond to a specific element in the configuration.

new_values

[mandatory] (list) A list of new values to replace the original values at the locations specified by 'keys'. The length of new_values must match the length of keys.

verbose

[optional] (logical) If TRUE, displays messages about the updates made (default: TRUE).

Value

No return value, called for side effects.

Examples

# Example: Modifying the configuration file
## Not run: 
  modify_config(
    path = "path/to/db",
    keys = list("limit", c("source", "MODIS/061/MOD13A2", "NDVI")),
    new_values = list(1000, "mean")
  )

## End(Not run)

geeLite documentation built on Aug. 9, 2025, 1:08 a.m.