Function to convert SpatialExperiment object to a data frame
Examples
data(sostaSPE)
.SPE2df(sostaSPE, marks = "cellType", imageCol = "imageName") |> head()
#> x y cellType imageName
#> 1 113.964828 79.72171 A image1
#> 2 18.828120 51.33354 A image1
#> 3 119.718375 57.28533 A image1
#> 4 38.557299 119.77972 A image1
#> 5 7.772233 87.46652 A image1
#> 6 18.213670 63.46682 A image1