This function matches vectors of two different lengths

weight.lag(x1, x2)

Arguments

x1

a vector

x2

a vector

Value

a matrix with two rows with the shortest length of the vector as the number of columns

Examples

weight.lag(1:5, 2:9)
#> [,1] [,2] [,3] [,4] [,5] #> x1 1 2 3 4 5 #> x2 2 3 4 5 6
weight.lag (seq(0, 10, 2), seq(4, 10, 2))
#> [,1] [,2] [,3] [,4] #> x1 0 2 4 6 #> x2 4 6 8 10