Learn R Programming

wrMisc (version 1.15.3.1)

.vector2Matr: Convert numeric vector to matrix

Description

Take (numeric) vector and return matrix, if 'colNa' given will be used as colname

Usage

.vector2Matr(x, colNa = NULL, rowsKeep = TRUE)

Value

matrix

Arguments

x

(numeric or character) main input

colNa

(integer) design the comumn-name to be given

rowsKeep

(logical) is TRUE make matrix of 1 column, otherwise of 1 row

See Also

Examples

Run this code
.vector2Matr(c(3:6))

Run the code above in your browser using DataLab