Displaying 1 result from an estimated 1 matches for "extractedcolumnvector".
2011 Jul 01
1
how to apply several math/logic operations on columns/rows of a matrix
...following task:
assume there is a 3x3 matrix:
1 2 4
4 5 3
1 3 4
How do I find - for each column separately - the position of the
column's minimum without using loop commands, i.e.:
I could extract each column in a loop and use something like:
for (loopColumn in 1 : 3){
extractedColumnVector = myMatrix[, loopColumn]
position = which(extractedColumnVector == min (extractedColumnVector ) )
print(position)
}
I think that there should be something simpler out there to handle these
kinds of tasks (maybe there is and I just don't know but I checked
several R books and could not fin...