R/st_grid_class.R
as_matrix-STGrid-method.RdThis function converts the bin_mat slot of an STGrid object into an x/y matrix (e.g. to be displayed using image())
# S4 method for STGrid
as_matrix(object, feature = NULL)The STGrid object
The (meta)feature of interest.
example_dataset()
#> |-- INFO : Dataset 11284233/files/Xenium_Mouse_Brain_Coronal_7g was already loaded.
xen <- Xenium_Mouse_Brain_Coronal_7g
image(as_matrix(xen))
#> Error in if (!(value.var %in% names(data))) { stop("value.var (", value.var, ") not found in input", call. = FALSE)}: argument is of length zero