I can not think of anything suitable. In Data.Matrix there are only switchRows. How can this be done? Perhaps over simple lists. I thought mapit lambda, but I could not make it up.

    1 answer 1

    switchColumns c1 c2 = transpose . (switchRows c2 c1) . transpose 
    • Brilliant. - name is too short