Learn R Programming

brmsmargins (version 0.2.1)

tab2mat: Convert a Row of a Table to a Square Matrix

Description

Utility function to convert a row matrix to a square matrix. Used as the brms package returns things like the Cholesky decomposition matrix as separate columns where rows are posterior draws. Not intended to be called directly by most users.

Usage

tab2mat(X)

tab2matR(X)

Value

A numeric matrix with one row.

Arguments

X

a matrix

Functions

  • tab2matR(): Pure R implementation of tab2mat().

Examples

Run this code
tab2mat(matrix(1:4, 1))
tab2mat(matrix(1:9, 1))

Run the code above in your browser using DataLab