readDT: Read displacement records via 'readTS()' with 'kind = "DT"'.

View source: R/readDT.R

readDTR Documentation

Read displacement records via readTS() with kind = "DT".

Description

Thin wrapper around readTS(); see there for full semantics.

Usage

readDT(.x, path)

Arguments

.x

data.table with columns ⁠RecordID, OwnerID, EventID, StationID⁠ (one row per record). Output of selectRecords().

path

Absolute path to the records root. The function reads per-station files under ⁠<path>/<OwnerID>/<EventID>/<StationID>/raw/⁠. Required – no default.

Value

See readTS().

Examples

root <- file.path(tempdir(), "gmsp-readdt-example")
unlink(root, recursive = TRUE)
raw <- file.path(root, "AAA", "E1", "S1", "raw")
dir.create(raw, recursive = TRUE)
data.table::fwrite(data.table::data.table(H1 = c(1, 2)),
                   file.path(raw, "DT.R1.csv"))
jsonlite::write_json(list(dt = 0.01), file.path(raw, "DT.R1.json"),
                     auto_unbox = TRUE)
selection <- data.table::data.table(
  RecordID = "R1", OwnerID = "AAA", EventID = "E1", StationID = "S1"
)
readDT(selection, path = root)


gmsp documentation built on July 18, 2026, 5:07 p.m.