Skip to contents

This function imports a specific category from an external database and updates the corresponding category in a unified database.

Usage

boilerplate_update_from_external(
  unified_db,
  category,
  external_path,
  db1_name = "Current Database",
  db2_name = "External Database",
  recursive = TRUE,
  sort_results = TRUE,
  quiet = FALSE
)

Arguments

unified_db

A list representing the unified database to update.

category

Character. The category to import and update (e.g., "measures", "methods").

external_path

Character. Path to the external data directory.

db1_name

Character string. The name of the first database (default: "Current Database").

db2_name

Character string. The name of the second database (default: "External Database").

recursive

Logical. Whether to merge hierarchical structures recursively (default: TRUE).

sort_results

Logical. Whether to sort the merged database alphabetically (default: TRUE).

quiet

Logical. If TRUE, suppresses all CLI alerts. Default is FALSE.

Value

A list representing the updated unified database.

Examples

if (FALSE) { # \dontrun{
# Import the current unified database
unified_db <- boilerplate_import()

# Update its measures category from an external project
unified_db <- boilerplate_update_from_external(
  unified_db = unified_db,
  category = "measures",
  external_path = "path/to/external/project/data"
)

# Save the updated database
boilerplate_save(unified_db)
} # }