I want to form a vector from some specific elements of matrix (or dataframe).
I would like to create vector from for example minor diagonal elements from this matrix (e.g elements matrix[3,1], matrix[2,2] and matrix [1,3]).
How could I do it without looping? My task is quite big and I would like skip looping. Following command:
matrix[c(3, 2, 1), c(1, 2, 3)]
instead of vector c(3, 5, 7) gives me another matrix.