Turns a numeric vector into a matrix that has 1 row or 1 column. Part of NIMBLE language.
Numeric to be turned into a single row or column matrix
In the NIMBLE language, some automatic determination of how to turn vectors into single-row or single-column matrices is done.
For example, in
A %*% x, where A is a matrix and x a vector, x will be turned into a single-column matrix unless
it is known at compile time that A is a single column, in which case x will be turned into a single-row matrix.
However, if it is desired that x be turned into a single row but A cannot be determined at compile time to be a single column,
then one can use
A %*% asRow(x) to force this conversion.
Perry de Valpine
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.