I am asked as an exercise to use recycling to initiate a 4 by 5 matrix where the first three rows are 0's and the fourth row has 4, 8, 12, 16, 20.
I understand that recycling is defined as if the lengths of the two vectors in a mathematical operation do not match, then the shorter vector is repeated until its length matches that of the larger vector. I have tried to create a matrix through the following and other things along the same line.
x = matrix(0,nrow=4,ncol=5) + c(4,8,12,16,20)
Of course this isn't correct so I am wondering what I am missing here. Any help is appreciated.