Learn R Programming

spatstat.geom (version 3.2-8)

summary.im: Summarizing a Pixel Image

Description

summary method for class "im".

Usage

# S3 method for im
summary(object, ...)
  # S3 method for summary.im
print(x, ...)

Value

summary.im returns an object of class "summary.im", while print.summary.im returns NULL.

Arguments

object

A pixel image.

...

Ignored.

x

Object of class "summary.im" as returned by summary.im.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net

Details

This is a method for the generic summary for the class "im". An object of class "im" describes a pixel image. See im.object) for details of this class.

summary.im extracts information about the pixel image, and print.summary.im prints this information in a comprehensible format.

In normal usage, print.summary.im is invoked implicitly when the user calls summary.im without assigning its value to anything. See the examples.

The information extracted by summary.im includes

range

The range of the image values.

mean

The mean of the image values.

integral

The ``integral'' of the image values, calculated as the sum of the image values multiplied by the area of one pixel.

dim

The dimensions of the pixel array: dim[1] is the number of rows in the array, corresponding to the y coordinate.

See Also

mean.im, integral.im, anyNA.im

Examples

Run this code
  # make an image
  X <- as.im(function(x,y) {x^2}, unit.square())
  # summarize it
  summary(X)
  # save the summary
  s <- summary(X)
  # print it
  print(X)
  s
  # extract stuff
  X$dim
  X$range
  X$integral

Run the code above in your browser using DataLab