Skip to contents

TRA/TRZ have a multi-column body after END_HEADER; the last column is the corrected acceleration. TRB/TRC have a single-column body after the Unidades: (TRB) or USER5 (TRC) line. OCID lives in the header: Component: (TRA/TRZ), Componente: (TRB), STREAM: (TRC).

Usage

readTR(file, type)

Arguments

file

Path to the file.

type

One of "TRA", "TRZ", "TRB", "TRC".

Value

LONG data.table(t, OCID, s).

Examples

file <- tempfile()
writeLines(c(
  "Component: HNZ",
  "rate: 100",
  "END_HEADER",
  "skip1",
  "skip2",
  "1 2 3",
  "4 5 6"
), file)
readTR(file, type = "TRA")
#>        t   OCID     s
#>    <num> <char> <int>
#> 1:  0.00    HNZ     3
#> 2:  0.01    HNZ     6