View source: R/cluster_import.R
cluster_import | R Documentation |
This function imports previously exported clustering results with
cluster_export()
and adds them to the colData()
slot of your
SpatialExperiment-class
object.
cluster_import(
spe,
cluster_dir = file.path(tempdir(), "exported_clusters"),
prefix = "imported_",
overwrite = TRUE
)
spe |
A
SpatialExperiment-class
object. See |
cluster_dir |
A |
prefix |
A |
overwrite |
A |
A
SpatialExperiment-class object
with the imported clusters appended on the colData()
.
Other cluster export/import utility functions:
cluster_export()
if (enough_ram()) {
## Obtain the necessary data
if (!exists("spe")) spe <- fetch_data("spe")
## Export two cluster variables
cluster_export(spe, "spatialLIBD")
cluster_export(spe, "GraphBased")
## Re-import them
colData(cluster_import(spe))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.