removeSpatialOutliers | R Documentation |
Removes data points that were identified as spatial outliers and all their related data. If no spatial outliers exist, the input object is returned as is.
removeSpatialOutliers(
object,
spatial_proc = TRUE,
rm_var = TRUE,
verbose = NULL
)
object |
An object of class |
spatial_proc |
Logical value. Indicates whether the new sub-object is
processed spatially. If If Only relevant, if |
rm_var |
Logical value. If |
verbose |
Logical. If (Warning messages will always be printed.) |
The updated input object, containing the added, removed or computed results.
identifyTissueOutline()
, identifySpatialOutliers()
, containsSpatialOutliers()
,
subsetSpataObject()
is the working horse behind the removal.
library(SPATA2)
data("example_data")
object <- example_data$object_UKF269T_diet
# spatial outliers have not been labeled histologically (= NA)
plotSurface(object, color_by = "histology")
object <- identifyTissueOutline(object) # step 1
plotSurface(object, color_by = "tissue_section")
object <- identifySpatialOutliers(object) # step 2
plotSurface(object, color_by = "sp_outlier")
nObs(object) # before removal
object <- removeSpatialOutliers(object) # step 3
plotSurface(object, color_by = "histology")
nObs(object) # after removal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.