I want to run a for loop that does a vector-matrix operation and returns a vector suffixed by the iteration number. E.g: If I have a 5 by 5 matrix , I want to take each column of the matrix at a time (at each iteration of the for loop) and work on a bunch of operations and at the end of it get a vector that is labelled as v_i where i refers to the column index and also the iteration number of the loop. I understand that this can be achieved in a for loop but I am not sure how to label the variable at each iteration.
For instance if I had to do this in SAS, I would have used v&i and put in a macro and run it. But not sure what is the R equivalent of this iterative labelling of variables.
Would really appreciate any help on this. I have a homework due next week and am in real crunch time. Thanks!