evalSpatialExpr: Evaluates an expression of SPP objects

View source: R/evalspatialExpr.R

evalSpatialExprR Documentation

Evaluates an expression of SPP objects

Description

This evaluates an arbitrary expression involving spatial point pattern objects 'ppp' which encode analyte distributions of MSI data.

Usage

evalSpatialExpr(exprn, dataList, win, normMethod = "imageMean")

Arguments

expr:

A character vector representing the arithmetic expression of 'ppp' objects listed in 'dataList'.

dataList:

A named list containing the 'ppp' objects involved in 'expr'.

win:

The window 'owin' object which all elements of 'dataList' share.

normMethod:

a character, the method used for normalizing intensities of 'ppp' objects in 'dataList'. This is particularly important when 'CPPMs' are considered i.e. 'ppp' objects carrying more than one analyte. One of 'c("imageMean", "pixelMean")'. Defaults to 'imageMean'.

Details

For ‘normMethod=’imageMean'' if the terms of 'expr' are CPPMs (i.e. holding several analytes) each pixel intensity within CPPM image is divided by the number of analytes contributing to the CPPM. For ‘normMethod=’pixelWise'', each pixel is down-weighted by the absolute number of analytes present in it. Both normalization types are applied before applying the arithmetic expression and do not have any effect of 'spp's that hold a single analyte.

Value

An object of type 'ppp' and 'moleculaR::analytePointPattern' holding the result of the applied expression 'expr'.


CeMOS-Mannheim/moleculaR documentation built on April 14, 2025, 8:27 a.m.