Learn R Programming

geeLite (version 1.0.2)

modify_config: 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)

Value

No return value, called for side effects.

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).

Examples

Run this code
# Example: Modifying the configuration file
if (FALSE) {
  modify_config(
    path = "path/to/db",
    keys = list("limit", c("source", "MODIS/061/MOD13A2", "NDVI")),
    new_values = list(1000, "mean")
  )
}

Run the code above in your browser using DataLab