superimpose {spatstat}R Documentation

Superimpose Several Point Patterns

Description

Superimpose any number of point patterns.

Usage

  superimpose(...)

Arguments

... Any number of arguments, each of which represents a point pattern. Each argument must be either a point pattern object (of class "ppp") or a structure containing elements x and y.

Details

This function is used to superimpose two or more point patterns (see also concatxy).

It assumes that each of the arguments in ... is either a point pattern object (of class "ppp") or a structure containing (at least) the elements x and y. All the point patterns are assumed to have the same window of observation.

The first argument must be a point pattern object, and it determines the observation window for the result.

If any of the arguments is a marked point pattern, then all of them must be. In that case, the result is also a marked point pattern.

If the arguments are given in the form name=value, then the names will be used as marks attached to the corresponding points. See the last line in the Examples.

Value

A point pattern (object of class "ppp") representing the superposition (union) of all the point patterns.

Author(s)

Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf

See Also

concatxy, quadscheme

Examples

  dat <- runifrect(30)
  xy <- list(x=runif(10),y=runif(10))
  new <- superimpose(dat, xy)
  ## Not run: plot(new)

  # how to make a 2-type point pattern with types "a" and "b"
  u <- superimpose(a = rpoispp(10), b = rpoispp(20))

  # how to make a 2-type point pattern with types 1 and 2
  u <- superimpose("1" = rpoispp(10), "2" = rpoispp(20))

[Package spatstat version 1.10-3 Index]