| save_scan | R Documentation |
Saves a snapshot dataset (typically produced by scan_storage())
as a uniquely identified .rds file.
save_scan(df, storage_id, path, label = NULL)
df |
Data.frame. Scan result with created with |
storage_id |
Character. Identifier of the storage. |
path |
Character. Directory where the file will be saved. |
label |
Character. Optional human-readable label describing
the scanned scope (e.g. "d_eviota"). Default is |
The filename encodes:
storage context
observation time
optional scope label
a deterministic hash
This ensures:
chronological ordering
uniqueness
reproducibility of stored observations
Invisibly returns the full file path of the saved .rds file.
tmp_dir <- tempfile()
dir.create(tmp_dir)
dir.create(file.path(tmp_dir, "R"))
dir.create(file.path(tmp_dir, "data"))
file.create(file.path(tmp_dir, "R", "a.R"))
file.create(file.path(tmp_dir, "R", "b.R"))
file.create(file.path(tmp_dir, "data", "c.csv"))
scan <- scan_storage(
root = tmp_dir,
storage_id = "test-storage"
)
save_scan(
df = scan,
storage_id = "test-storage",
path = tmp_dir
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.