PSL2PSW: Convert long response spectra to wide form.

View source: R/tableContracts.R

PSL2PSWR Documentation

Convert long response spectra to wide form.

Description

PSL2PSW() casts canonical long spectra rows to wide columns such as PSA.H1, PSV.H1, and SD.H1.

Usage

PSL2PSW(.x, by = "auto")

Arguments

.x

Long spectra table with columns OCID, Tn, ID, and S.

by

Metadata columns to keep as row keys. The default "auto" uses all columns except OCID, Tn, ID, and S.

Value

A wide spectra data.table.

Examples

psl <- data.table::data.table(RecordID = "R1", OCID = "H1",
                              Tn = 0.1, ID = "PSA", S = 1)
PSL2PSW(psl)

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