Returns an existing vector re-typed as a matrix by installing matrix dimensions (and optional dimnames) as metadata.
Arguments
- x
A vector.
- nrow
Optional target row count.
- ncol
Optional target column count.
- dimnames
Optional
dimnamesfor the resulting matrix.- copy
If TRUE (default), allocate a new fmalloc-backed matrix object. If FALSE, install metadata in place on the same fmalloc ALTREP payload without allocation (this also updates any aliases of
x).