rowColVector: Propagate vector to single-row or single-column matrix...

Description Usage Arguments Value Author(s) Examples

Description

This utility function converts a plain vector into a row or column vector, i.e. a single-row or single-column matrix.

Usage

1
2
rowVector(x, label=NULL)
colVector(x, label=NULL)

Arguments

x

a (typically numeric) vector

label

an optional character string specifying a label for the single row or column returned

Value

A single-row or single-column matrix of the same data type as x. Labels of x are preserved as column/row names of the matrix.

See matrix for details on how non-atomic objects are handled.

Author(s)

Stefan Evert <stefan.evert@fau.de>

Examples

1
2
rowVector(1:5, "myvec")
colVector(c(A=1, B=2, C=3), label="myvec")

corpora documentation built on May 2, 2019, 2:12 p.m.