Superimpose Several Point Patterns
Superimpose any number of point patterns.
superimpose(..., W=NULL, check=TRUE)
- 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
- Optional. Window for the resulting point pattern.
An object of class
"owin", or something acceptable to
- Logical value (passed to
ppp) determining whether to check the geometrical validity of the resulting point pattern.
This function is used to superimpose two or more point patterns
Each of the arguments in
... is either a point pattern object (of class
or a structure containing (at least) the elements
y. The point patterns are not required to have
the same window of observation.
The window for the superimposed point pattern is
W. Its default value is
the union of the windows of all the point patterns.
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
then the names will be used
as marks attached to the corresponding points. See the last line
in the Examples.
- A point pattern (object of class
"ppp") representing the superposition (union) of all the point patterns.
superimposePSP for superimposing patterns of line segments.
dat <- runifrect(30) xy <- list(x=runif(10),y=runif(10)) new <- superimpose(dat, xy) 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))