Skip to contents

Coerce to matrix

Usage

# S4 method for class 'spatLocsObj'
as.matrix(x, id_rownames = TRUE, ...)

# S4 method for class 'overlapPointDT'
as.matrix(x, feat_count_column = NULL, ...)

# S4 method for class 'overlapIntensityDT'
as.matrix(x, ...)

# S4 method for class 'nnNetObj'
as.matrix(x, attr = NULL, ...)

Arguments

x

object to coerce

id_rownames

logical. Retain the spatial IDs as the rownames

...

additional params to pass (none implemented)

feat_count_column

character. If provided, column in overlaps info that contains count information to take into account when generating matrix. This is important when point detections represent more than one count.

attr

Either NULL or character providing the name of an edge attribute to include in the ajacency matrix. The edge attribute to use must be either logical or numeric.

Value

matrix

Examples

sl <- GiottoData::loadSubObjectMini("spatLocsObj")
m <- as.matrix(sl)