Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matrix-colVec

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

The functions 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

## Create a numeric Vector:
   x = rnorm(5)
   
## Column and Row Vectors:
   colVec(x)
   rowVec(x)

fBasics

Rmetrics - Markets and Basic Statistics

v3042.89.1
GPL (>= 2)
Authors
Diethelm Wuertz [aut], Tobias Setz [cre], Yohan Chalabi [ctb] Martin Maechler [ctb]
Initial release
2017-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.