mk_mtx_from_vecs: Create matrix from vectors

View source: R/mk_mtx_from_vecs.R

mk_mtx_from_vecsR Documentation

Create matrix from vectors

Description

Binds the supplied vectors into columns of a matrix consisting with vector names as column names (if the vectors are named).

Usage

mk_mtx_from_vecs(...)

Arguments

...

One or more named vectors which should be combined into the columns of a matrix. If the vectors are named, these names will become the column names. Note that the vectors should all be of the same length and type.

Value

A matrix constructed from the named vectors.

Examples

mk_mtx_from_vecs(col_1 = c("a", "b"), col_2 = c("alpha", "bravo"))

mk_mtx_from_vecs(A = c(1, 10, 100))

mk_mtx_from_vecs(seq(10, 30, 10), seq(70, 90, 10))


toniprice/jute documentation built on Jan. 11, 2023, 8:23 a.m.