auditParsers: Audit parsers: dry-run 'parseRecord' on every record of an...

View source: R/auditParsers.R

auditParsersR Documentation

Audit parsers: dry-run parseRecord on every record of an owner.

Description

Iterates a record metadata subset for owner, calls parseRecord per unique ⁠(EventID, StationID)⁠, catches errors, and returns a status table.

Usage

auditParsers(.x, owner, path)

Arguments

.x

record metadata data.table.

owner

one OwnerID string.

path

Absolute path to the records root passed through to parseRecord(). Required – no default.

Value

data.table(OwnerID, EventID, StationID, status, reason).

Examples

root <- file.path(tempdir(), "gmsp-auditparsers-example")
unlink(root, recursive = TRUE)
raw <- file.path(root, "ESM", "E1", "S1", "raw.owner")
dir.create(raw, recursive = TRUE)
writeLines(c("0 1", "0.01 2", "0.02 3"), file.path(raw, "N_acc.txt"))
writeLines(c("0 2", "0.01 3", "0.02 4"), file.path(raw, "E_acc.txt"))
writeLines(c("0 0", "0.01 1", "0.02 0"), file.path(raw, "Z_acc.txt"))
rows <- data.table::data.table(
  OwnerID = "ESM", EventID = "E1", StationID = "S1",
  FileID = c("N_acc.txt", "E_acc.txt", "Z_acc.txt")
)
auditParsers(rows, owner = "ESM", path = root)


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