I have 32 columns of annual data in varying lengths which I can simulate as follows:
SeedRandom[23458];
lengths = RandomInteger[{50, 100}, 32];
cols = RandomReal[{0, 1}, #] & /@ lengths;
From this I need successive accumulations of ten years. So I have two questions. First, how do I Join multiple years? There is surely something more elegant than this
Join[cols[[1]], cols[[2]], cols[[3]],
cols[[4]](*...and so forth through cols[[10]]*)];
Second, how do I get a sequence which accumulates the first ten years, then years 2-11, then years 3-12, then years 4-13 and so forth through to years 23-32?
Join[cols[[1]], cols[[2]], cols[[3]],...
you can just doFlatten[cols]
$\endgroup$