as_matrix: Assemble a list of vectors and matrices into a matrix

Description Usage Arguments Examples

View source: R/verbs-storage.R

Description

as_matrix() binds columns into a matrix. These columns can come in the form of vectors or of a list or a data frame of vectors.

Usage

1

Arguments

...

Vectors and/or lists of vectors.

Examples

1
2
3
4
5
6
vectors <- mtcars[3:4]
as_matrix(vectors, mpg = mtcars$mpg, vectors, mtcars$am)

# If applied on an empty list or without arguments, as_matrix()
# returns a 0x0 matrix:
matrix()

lionel-/gsim documentation built on May 21, 2019, 6:41 a.m.