Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

with.ssf

Evaluate Expression in a Spatially Sampled Function


Description

Given a spatially sampled function, evaluate an expression involving the function values.

Usage

apply.ssf(X, ...)

  ## S3 method for class 'ssf'
with(data, ...)

Arguments

X, data

A spatially sampled function (object of class "ssf").

...

Arguments passed to with.default or apply specifying what to compute.

Details

An object of class "ssf" represents a function (real- or vector-valued) that has been sampled at a finite set of points. It contains a data frame which provides the function values at the sample points.

In with.ssf, the expression specified by ... will be evaluated in this dataframe. In apply.ssf, the dataframe will be subjected to the apply operator using the additional arguments ....

If the result of evaluation is a data frame with one row for each data point, or a numeric vector with one entry for each data point, then the result will be an object of class "ssf" containing this information. Otherwise, the result will be a numeric vector.

Value

An object of class "ssf" or a numeric vector.

Author(s)

See Also

Examples

a <- ssf(cells, data.frame(d=nndist(cells), i=1:npoints(cells)))
  with(a, i/d)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.