Skip to contents

This function removes metadata from a YAML configuration file by deleting the specified key from the metadata section of the file.

Usage

remove_metadata(config_path, key)

Arguments

config_path

The file path to the YAML configuration file

key

The key for the metadata entry to be removed

Value

The updated configuration after removing the specified metadata

Examples

# Read the YAML file
test_config <- system.file("config", "default_config.yml", package = "connector")
file.copy(test_config, "test_config.yaml")
#> [1] TRUE

# Add metadata
config <- add_metadata("test_config.yaml", "new_metadata", "new_value")

# Remove metadata
config <- remove_metadata("test_config.yaml", "new_metadata")

unlink("test_config.yaml")