Retrieves a matrix property with the specified name for the given axes from the Daf data set.
Value
A matrix with row and column names set to the axis entry names, or the default value if the property doesn't exist
Details
Matrix properties store two-dimensional data along two axes.
If the matrix doesn't exist and default is NA, a matrix of NAs with appropriate dimensions is returned.
If relayout is TRUE and the matrix exists with flipped axes, it will be transposed automatically.
For zero-copy-eligible element types, the returned matrix is a live
view over Julia-side memory; sparse CSC matrices are also zero-copy
via jlview::jlview_sparse. Mutating the Daf through
set_matrix() or file-mapped writes may alter the contents of a
previously returned matrix. Copy explicitly if stability across
modifications is required.
See the Julia documentation for details.
Examples
if (FALSE) { # \dontrun{
setup_daf()
daf <- memory_daf("example")
add_axis(daf, "cell", c("A", "B"))
add_axis(daf, "gene", c("X", "Y", "Z"))
mat <- matrix(1:6, nrow = 2, ncol = 3)
set_matrix(daf, "cell", "gene", "UMIs", mat)
get_matrix(daf, "cell", "gene", "UMIs")
} # }