I'm looking for a general way to do the following, I have a triangular matrix of nxn, for example:
a NA NA
b d NA
c e f
and convert it in:
a d f
b e NA
c NA NA
The idea is: for each column move the values, until the first non-NA value is in the first row
I imagine that it is done with a for, for each column, so that it goes up, but I do not know how to make it ...