Read velocity records via readTS() with kind = "VT".
readVT.RdThin wrapper around readTS(); see there for full semantics.
Arguments
- .x
data.tablewith columnsRecordID, OwnerID, EventID, StationID(one row per record). Output ofselectRecords().- 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-readvt-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, "VT.R1.csv"))
jsonlite::write_json(list(dt = 0.01), file.path(raw, "VT.R1.json"),
auto_unbox = TRUE)
selection <- data.table::data.table(
RecordID = "R1", OwnerID = "AAA", EventID = "E1", StationID = "S1"
)
readVT(selection, path = root)
#> RecordID OwnerID EventID StationID t H1
#> <char> <char> <char> <char> <num> <int>
#> 1: R1 AAA E1 S1 0.00 1
#> 2: R1 AAA E1 S1 0.01 2