Learn R Programming

BMhyb (version 1.5.2)

ConvertVectorToMatrix: Convert a vector into a matrix

Description

The function outputs a matrix given a vector as its elements in the upper triangular part.

Usage

ConvertVectorToMatrix(x)

Arguments

x

x: a postive integer that indicates the number of elements in the upper triangular matrix.

Value

A square matrix

Details

The length of vector equal the number of elements in a squared upper triangular matrix. It assigns value in the vector to the matrix accordingly. Eventually, the output of the matrix will be the matrix with lower triangular part equal to the upper triangular part.