v: A shortcut to create a vertical vector

Description Usage Arguments Value Examples

View source: R/vector.R

Description

This function provides convenient shortcut to create a vertical (column) vector.

Usage

1
v(...)

Arguments

...

arbitrary number of values

Value

matrix with dims n_elements x 1

Examples

1
2
3
4
# Enumerating all the values with commas
v(1, 2, 3)
# Passing whole sequence as an argument
v(1:5)

Example output

     [,1]
[1,]    1
[2,]    2
[3,]    3
     [,1]
[1,]    1
[2,]    2
[3,]    3
[4,]    4
[5,]    5

matricks documentation built on March 26, 2020, 6:22 p.m.