1
$\begingroup$

I need to transpose the two following lists:

data0 = {99.52267, 93.78726, 99.67644, 99.85036};
error0 = {0.21152, 0.37626, 0.16309, 0.10167};

Into rightArrow and comma format

{99.52267 -> 0.21152, 93.78726 -> 0.37626, 99.67644 -> 0.16309, 
 99.85036 -> 0.10167}
$\endgroup$

closed as off-topic by C. E., MarcoB, Bob Hanlon, mikado, ubpdqn Oct 20 at 11:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – C. E., MarcoB, Bob Hanlon, mikado, ubpdqn
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 9
    $\begingroup$ try Thread[data0 -> error0]? $\endgroup$ – kglr Oct 19 at 19:59
  • $\begingroup$ Or MapThread[Rule,{data0,error0}] $\endgroup$ – Mark R Oct 20 at 2:18
  • $\begingroup$ AssociationThread[data0->error]. Creates and association that can be used like rule with Replace. And is even more efficient. $\endgroup$ – Henrik Schumacher Oct 20 at 3:13
  • $\begingroup$ There is also Inner[Rule, data0, error0, List] $\endgroup$ – Bob Hanlon Oct 20 at 3:54

Browse other questions tagged or ask your own question.