Description Usage Arguments Warning Examples
This function manipulates a numeric data structure of vector/array/matrix type in order to obtain a matrix representation. For 1D data structures and column/row arrays and matrices the output is turned in a matrix format with just one row. If the input structure is rectangular, instead, it is only converted in matrix format.
1 |
D |
a generic array, matrix or vector to be converted in row-matrix format. |
The function is not supposed to work with arbitrary N-dimensional arrays.
1 2 3 4 5 6 7 8 9 10 11 12 13 | toRowMatrixForm( 1 : 10 )
toRowMatrixForm( array( 1 : 10, dim = c(1,10 ) ) )
toRowMatrixForm( array( 1 : 10, dim = c( 10, 1 ) ) )
toRowMatrixForm( matrix( 1 : 10, ncol = 10, nrow = 1 ) )
toRowMatrixForm( matrix( 1 : 10, ncol = 1, nrow = 10 ) )
toRowMatrixForm( matrix( 1 : 12, ncol = 3, nrow = 4 ) )
toRowMatrixForm( matrix( 1 : 12, ncol = 4, nrow = 3 ) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.