1
$\begingroup$

I have two lists that I want to riffle together, but they are lists within lists.

means={{314.027, 311.279, 278.39, 287.405, 276.379, 265.199, 269.911},{317.122, 331.514, 285.738, 291.407, 287.865, 276.812, 294.436}};
dev={{37.5608, 46.5827, 19.7565, 28.9158, 23.8619, 22.0467, 18.8418}, {36.9014, 47.4611, 26.3038, 22.0878, 39.6042, 39.2833, 29.1026}};

So essentially I want to riffle the first list in the first list with the first list in the second list. This is just an example (there is a lot more to the list!) so it can't depend on the number of lists within lists or number of values in each list (as this can vary) but the first list of each list will match up by riffle.

$\endgroup$
  • 1
    $\begingroup$ Riffle @@@ Transpose[{means, dev}] $\endgroup$ – corey979 Mar 4 '17 at 22:29
  • 2
    $\begingroup$ ... or MapThread[Riffle, {means, dev}]? $\endgroup$ – kglr Mar 4 '17 at 22:35

Browse other questions tagged or ask your own question.