I'm very new to R and am getting starting with some simple calculation.
I have imported some data called BM_Returns, I am able to select a specific column and perform calculations on that column fine, how would i do it for all/a subset of the column?
example:
S1_Ann_ret <- (prod(1+(BM_Returns$Stock_1/100))^(1/yrs))-1
In my data column 1 is dates all other columns (2-15) are ones i would like to perform the above and other calculations on.
Thanks