v input view cols column references gcol new group column name
Group takes a view v and rearranges all repeated values in cols, so that they appear once, with all other columns grouped into a new gcol subview column.
If cols is empty, all rows will be moved into a single subview.
Examples:set v [view {A B} def {a 1 b 2 c 5 b 3 b 4}]
view $v group A G
view $v group {A B} G
A G 0 a
B 0 1 1 b
B 0 2 1 3 2 4 2 c
B 0 5
view $v group {} G
A B G 0 a 1
0 1 b 2
0 2 c 5
0 3 b 3
0 4 b 4
0
G 0
A B 0 a 1 1 b 2 2 c 5 3 b 3 4 b 4