Expand scalar or vector to a matrix.
scalar, vector, matrix or CompressedMatrix.
integer vector of length 2 specifying the required dimensions of the output matrix.
logical scalar specifying if matrix should be filled by columns or rows for a vector
This function expands a scalar, row/column vector or CompressedMatrix to be a matrix of dimensions
It is used internally in edgeR to convert offsets, weights and other values to a matrix for consistent handling.
NULL, the function is equivalent to calling
x is a vector, its length must match one of the output dimensions.
The matrix will then be filled by repeating the matrix across the matching dimension.
For example, if
length(x)==dim, the matrix will be filled such that each row contains
If both dimensions match, filling is determined by
byrow, with filling by rows as the default.
x CompressedMatrix object, the size of any non-repeated dimensions must be consistent with corresponding output dimension.
byrow argument will be ignored as the repeat specifications will dictate how expansion should be performed.
?CompressedMatrix for more details.
Numeric matrix of dimension
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.