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

as.function.im

Convert Pixel Image to Function of Coordinates


Description

Converts a pixel image to a function of the x and y coordinates.

Usage

## S3 method for class 'im'
as.function(x, ...)

Arguments

x

Pixel image (object of class "im").

...

Ignored.

Details

This command converts a pixel image (object of class "im") to a function(x,y) where the arguments x and y are (vectors of) spatial coordinates. This function returns the pixel values at the specified locations.

Value

A function in the R language, also belonging to the class "funxy".

Author(s)

and Ege Rubak rubak@math.aau.dk

See Also

Examples

d <- setcov(square(1))
  f <- as.function(d)
  f(0.1, 0.3)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

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