I have a list of lists of the form:
{{1, 2}, {2, 4}, {2, 8}}
But I want to multiply only the second dimension of that data by a constant. I know I could do this with a loop but that is "dirty". There has to be a better way. For example if I multiply the second dimension by 2 I would get:
{{1, 4}, {2, 8}, {2, 16}}
smartThread[{{1, 2}, {2, 4}, {2, 8}}*{1, 2}]
$\endgroup$Transpose[{1, 2} Transpose[lst]]
andScalingTransform[{1, 2}][lst]
are other possibilities. Both from an old MathGroup post by Carl Woll, according to my notes. The first one seems to be very fast. $\endgroup$