Skip to contents

Out of memory data, such as DelayedArray, some SpatRasterImage objects, and BioFormatsImage, will break if saved as RDS. This method of containsOutOfMemoryData checks if an SFE object has out of memory data, specifically the images. Having out of memory data will result into an error when saveRDS is called; we recommend using the alabaster.sfe package instead.

Usage

# S4 method for class 'SpatialFeatureExperiment'
containsOutOfMemoryData(object)

Arguments

object

An SFE object

Value

TRUE or FALSE

Examples

outdir <- system.file("extdata", package = "SpatialFeatureExperiment")
samples <- file.path(outdir, paste0("sample0", 1:2))
sfe <- read10xVisiumSFE(samples, type = "sparse", data = "filtered")
#> >>> 10X Visium data will be loaded: outs
#> >>> Adding spatial neighborhood graph to sample01
#> >>> 10X Visium data will be loaded: outs
#> >>> Adding spatial neighborhood graph to sample02
containsOutOfMemoryData(sfe)
#> [1] TRUE