readAT2: Read a PEER NGA-West2 AT2 acceleration record.

View source: R/readAT2.R

readAT2R Documentation

Read a PEER NGA-West2 AT2 acceleration record.

Description

AT2 has a 4-line header ending with ⁠NPTS=⁠/⁠DT=⁠. Line 2 holds the direction as the last comma-separated token (e.g., ⁠Helena Montana-01, 10/31/1935, Carroll College, 180⁠). Body has up to 8 values per row in scientific notation; "stuck" negatives (1.234-5.678) are split before parsing. Truncated at NPTS.

Usage

readAT2(file)

Arguments

file

Path to the .AT2 file.

Value

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

Examples

file <- tempfile(fileext = ".AT2")
writeLines(c(
  "header",
  "Event, date, station, H1",
  "units",
  "NPTS= 4, DT= 0.01 SEC",
  "1.0 2.0 3.0 4.0"
), file)
readAT2(file)


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