returning a value from a column if row number equals to a given value : <p>I have a dataframe with two columns, let's call them "value" and "diff". The column diff contains random row numbers.
I would like to create a vector by selecting values from the column "value" satisfying one condition, namely finding the value where the number given in diff column equals to the rownumber of the dataframe.
Shall I try it with a for loop, or is there an easier solution?</p>
