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

mean.linim

Mean, Median, Quantiles of Pixel Values on a Linear Network


Description

Calculates the mean, median, or quantiles of the pixel values in a pixel image on a linear network.

Usage

## S3 method for class 'linim'
mean(x, ...)

  ## S3 method for class 'linim'
median(x, ...)

  ## S3 method for class 'linim'
quantile(x, probs=seq(0,1,0.25), ...)

Arguments

x

A pixel image on a linear network (object of class "linim").

probs

Vector of probabilities for which quantiles should be calculated.

...

Arguments passed to other methods.

Details

These functions calculate the mean, median and quantiles of the pixel values in the image x on a linear network.

An object of class "linim" describes a pixel image on a linear network. See linim.

The functions described here are methods for the generic mean, median and quantile for the class "linim".

Value

For mean and median, a single number. For quantile, a numeric vector of the same length as probs.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

M <- as.mask.psp(as.psp(simplenet))
  Z <- as.im(function(x,y) {x-y}, W=M)
  X <- linim(simplenet, Z)
  X
  mean(X)
  median(X)
  quantile(X)

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

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