| Library: | multi |
| See also: | matrix |
| Quantlet: | shiftr | |
| Description: | Shifts the rows of a matrix |
| Usage: | y = shiftr(x,a,b) | |
| Input: | ||
| x | matrix (n x k) | |
| a | vector (n x 1) or (1 x 1) gives amount of shift per row | |
| b | vector (n x 1) or (1 x 1) values that are used to fill up | |
| Output: | ||
| y | matrix with rows shifted to the right by a and filled with b | |
library("multi")
shiftr(eye(2),1,2)
Contents of y [1,] 2 1 [2,] 2 0
| Library: | multi |
| See also: | matrix |