R/vector.R

Defines functions v

Documented in v

#' @name v
#' @title A shortcut to create a vertical vector
#' @description
#' This function provides convenient shortcut
#' to create a vertical (column) vector.
#' @param ... arbitrary number of values
#' @return matrix with dims n_elements x 1
#' @examples
#' # Enumerating all the values with commas
#' v(1, 2, 3)
#' # Passing whole sequence as an argument
#' v(1:5)
#' @export
v <- function(...){
  matrix(c(...), ncol = 1)
}

Try the matricks package in your browser

Any scripts or data that you put into this service are public.

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