Description
Combine selected vector fields using mean, sum, maximum magnitude, or the
first value. In ingroup mode, reduce the columns in each group to one column;
in overgroup mode, combine corresponding columns across groups, which must
have matching column counts.
Synopsis
sgstack op=mean mode=ingroup <stdin in.fields=FIELD("data") >stdout
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
op |
enum |
mean
|
stack using the mean, sum, maximum magnitude, or first value |
mode |
enum |
ingroup
|
stack columns within each group or corresponding columns across groups |
in |
ifile |
stdin
|
input file |
in.fields |
fields |
FIELD("data")
|
fields to stack |
out |
ofile |
stdout
|
output file |
Input and output
Input
input file
Output
output file