Skip to contents

Function to convert spatial coordinates of a SpatialExperiment object to a ppp object

Usage

SPE2ppp(spe, marks, image_col = NULL, image_id = NULL)

Arguments

spe

SpatialExperiment; a object of class SpatialExperiment

marks

character; name of column in colData that will correspond to the ppp marks

image_col

character; name of a column in colData that corresponds to the image

image_id

character; image id, must be present in image_col

Value

ppp; object of type ppp

Examples

spe <- imcdatasets::Damond_2019_Pancreas("spe", full_dataset = FALSE)
#> see ?imcdatasets and browseVignettes('imcdatasets') for documentation
#> downloading 1 resources
#> retrieving 1 resource
#> loading from cache
SPE2ppp(spe, marks = "cell_category", image_col = "image_name", image_id = "E04")
#> Marked planar point pattern: 3139 points
#> marks are of storage type  ‘character’
#> window: rectangle = [0.6154, 682.3333] x [0, 494] units