I have the following matrix:
mymatrix <- matrix(1:16, nrow = 4, ncol = 4, dimnames = list(letters[1:4], 1:4))
I would like to reverse the order of row names (without changing matrix cell values) for some specific rows, for instance row b and row c. How could I manage it? In fact is similar to just rename these rows, but I have to do that for many rows grouped in different places across the matrix and I would like to do it in a single step.
Thank you very much in advance!