Hi All,
I have a table idx which contains a varying number of columns with grouping fields. The columns are named A through to
C depending how many there are (in practice never more than 3 so far). The final two columns are a timestamp column t and a float column called
rslt.
I want to replace the grouping columns with 1 column 'C containing a list of values that were formally in separate columns.
To do this for a table with fixed number of grouping columns (say columns A and
B), I would use:
?[
idx;();0b;c
trslt!((+:;(enlist;(
idx;enlistA);(
idx;enlistB)));
t;rslt)]
However, since I don’t know how many columns there will be, I tried using a list of those grouping columns grpC: A
B`C
to replace
(
idx;enlistA);(
idx;enlistB)
with
{(
idx;enlist x)} each grpC`
This didn’t work.
Does anyone know how I write this function so that I can have a varying number of provided columns all re cast to a list of values in a single column?
Thanks and regards,
Simon