Converts a list of vectors into a matrix with vectors as columns or rows.
Usage
asMatrixCols(xs, row.names, col.names)
asMatrixRows(xs, row.names, col.names)
Arguments
- xs
[list]
A list of vectors of the same length.
- row.names
[character | integer | NULL]
Row names of result.
Default is to take the names of the elements of xs.
- col.names
[character | integer | NULL]
Column names of result.
Default is to take the names of the elements of xs.