I have matrix which has 120 columns and 7 rows in each. I want vectors in which every vector is vn where n is number of column, and it has every value of vector multiplied in "series".
For example, second column has values c(1, 2, 3, 4, 5, 6, 7)
. So I want vector v2
, which would be 1*2*3*4*5*6*7 = 5040, so v2 = 5040. What is easiest way to do this?