I have an index data frame which have index$row and index$col columns which indicate row and columns of X data frame.
index data frame
I want to take the minimum values of each observation in X data frame, which is indicated by index data frame.
How can I do it without using a for loop?
I need this because i have more than one index data frame and this takes very much time with for loop.
We can convert the 'index' to
matrix (assuming 'index' is
data.frame) and extract the values of the minimum values from the 'X' dataset using the row/column indexing provided by 'index'. The code is below