matrix_to_list_of_cols {poputils} | R Documentation |
Turn a Matrix Into a List of Columns or Rows
Description
Given a matrix, create a list, each element of which contains a column or row from the matrix.
Usage
matrix_to_list_of_cols(m)
matrix_to_list_of_rows(m)
Arguments
m |
A matrix |
Details
matrix_to_list_of_cols()
and 'matrix_to_list_of_rows() are
internal functions, for use by developers, and would not
normally be called directly by end users.
Value
-
matrix_to_list_of_cols()
A list of vectors, each of which is a column fromx
. -
matrix_to_list_of_rows()
, A list of vectors, each of which is a row fromx
.
Examples
m <- matrix(1:12, nrow = 3)
matrix_to_list_of_cols(m)
matrix_to_list_of_rows(m)
[Package poputils version 0.3.1 Index]