IML2IMW: Convert long intensity tables to wide form.

View source: R/tableContracts.R

IML2IMWR Documentation

Convert long intensity tables to wide form.

Description

IML2IMW() casts long intensity output from TSL2IM() / getIntensity() to one row per metadata and OCID, with intensity measures as columns.

Usage

IML2IMW(.x, by = "auto")

Arguments

.x

Long intensity table with columns OCID, IM, and value.

by

Metadata columns to keep as row keys. The default "auto" uses all columns except OCID, ID, IM, value, and units.

Value

A wide intensity data.table.

Examples

iml <- data.table::data.table(RecordID = "R1", OCID = "H1",
                              ID = "AT", IM = "PGA",
                              value = 1, units = "mm /s2")
IML2IMW(iml)

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