This function provides convenient shortcut to create a vertical (column) vector.
v(...)
... | arbitrary number of values |
---|
matrix with dims n_elements x 1
# Enumerating all the values with commas v(1, 2, 3)#> [,1] #> [1,] 1 #> [2,] 2 #> [3,] 3# Passing whole sequence as an argument v(1:5)#> [,1] #> [1,] 1 #> [2,] 2 #> [3,] 3 #> [4,] 4 #> [5,] 5