format_spe_to_ppp: Format SPE object as a ppp object ('spatstat' package)

View source: R/format_spe_to_ppp.R

format_spe_to_pppR Documentation

Format SPE object as a ppp object ('spatstat' package)

Description

Formats an spe object into a ppp object which has the x,y coordinates, phenotypes as markers window specifies the range of x and y coordinates

Usage

format_spe_to_ppp(
  spe_object,
  window_pol = FALSE,
  feature_colname = "Phenotype"
)

Arguments

spe_object

SpatialExperiment object in the form of the output of format_image_to_spe.

window_pol

Optional Boolean Specifying if the window is polygon.

feature_colname

String specifying the feature column of interest.

Value

A ppp object is returned (defined in 'spatstat' package)

Examples

ppp_object<-format_spe_to_ppp(SPIAT::defined_image, 
feature_colname = "Cell.Type")

TrigosTeam/SPIAT documentation built on Aug. 22, 2024, 7:50 p.m.