I have a vector like this in R:
vec1 <- c(14000,12000,8000)
I'm trying to create a matrix where 14000 is my main diagonal, 1200 is one above the diagonal, 8000 two above the diagonal.
I'm familiar with doing this in Python/numpy but can't figure it out in R (or at least an efficient way to do it). Ideally output would look like this:
14000 12000 8000
0 14000 12000
0 0 14000