Skip to contents

Removes a dataset definition after validating the resulting configuration. In an interactive session, delete = NULL asks whether its tracked local files should also be deleted. Deletion runs before the YAML edit so datum can still resolve the dataset target. In non-interactive use, NULL is treated as FALSE; set delete explicitly for reproducible scripts.

Usage

datum_dataset_remove(
  id,
  delete = NULL,
  config = ".data.yaml",
  lock = NULL,
  executable = NULL,
  wd = NULL,
  timeout = getOption("datur.timeout", 300)
)

Arguments

id

Unique dataset identifier.

delete

Whether to run datum_delete() before removing the definition. NULL asks interactively and otherwise keeps local files.

config

Configuration path. A missing file is created with version 1.

lock

Optional datum lockfile path used when delete = TRUE.

executable

Optional explicit executable path.

wd

Optional child-process working directory.

timeout

Positive finite timeout in seconds.

Value

Invisibly, the normalized configuration path.

Examples

if (FALSE) { # \dontrun{
datum_dataset_remove("rates")
datum_dataset_remove("rates", delete = TRUE)
} # }