View source: R/mapComponents.R
| mapComponents | R Documentation |
Classifies a single three-component record, preserves provider channel names
in OCID, and records canonical processed directions in DIR
(H1, H2, UP). This helper is for processed products; raw extraction
continues to preserve provider OCID values.
mapComponents(DT, rotate = TRUE, output = c("long", "wide"))
DT |
LONG |
rotate |
Logical scalar. If |
output |
|
A data.table in the requested output shape, or NULL when the
record cannot be mapped. Both shapes carry attr(out, "componentMap")
and attr(out, "rotate"); rotated outputs also carry
attr(out, "theta").
extractRecord()
t <- seq(0, 1, by = 0.1)
x <- data.table::rbindlist(list(
data.table::data.table(t = t, OCID = "N", s = sin(2 * pi * t)),
data.table::data.table(t = t, OCID = "E", s = 0.5 * cos(2 * pi * t)),
data.table::data.table(t = t, OCID = "Z", s = 0.1 * sin(2 * pi * t))
))
mapped <- mapComponents(x, rotate = FALSE)
head(mapped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.