I'm sure theres a name for this type of matrix but not sure of it. In R I want to quickly convert a variable x:
x = 1:10
x #[1] 1 2 3 4 5 6 7 8 9 10
into a matrix where all the diagonals (not the main diagonal) are the same in one direction, the anti-diagonal direction:
x
1 1 2 3 4 5 6 7 8 9 10
2 2 3 4 5 6 7 8 9 10 NA
3 3 4 5 6 7 8 9 10 NA NA
4 4 5 6 7 8 9 10 NA NA NA
5 5 6 7 8 9 10 NA NA NA NA
6 6 7 8 9 10 NA NA NA NA NA
7 7 8 9 10 NA NA NA NA NA NA
8 8 9 10 NA NA NA NA NA NA NA
9 9 10 NA NA NA NA NA NA NA NA
10 10 NA NA NA NA NA NA NA NA NA
thanks