matrix-colVec: Column and row vectors

colVecR Documentation

Column and row vectors

Description

Creates a column or row vector from a numeric vector.

Usage

colVec(x)
rowVec(x)

Arguments

x

a numeric vector.

Details

colVec and rowVec transform a vector into a column and row vector, respectively. A column vector is a matrix object with one column, and a row vector is a matrix object with one row.

Examples

x = rnorm(5)
   
colVec(x)
rowVec(x)                        

fBasics documentation built on Aug. 20, 2024, 3:01 a.m.