rsppmix: Generate a spatial point pattern from normal mixture.

Description Usage Arguments Details Value Examples

Description

This function generates a point pattern from a given normal mixture or intensity surface.

Usage

1

Arguments

x

Object of class intensity_surface or normmix.

...

Further parameters passed to to_int_surf(). See to_int_surf for details.

truncate

Whether to truncate the points outside the domain, default to TRUE.

Details

If an intensity surface is passed to intsurf, it will generate mixture directly. If you don't have an intensity surface beforehand, you can pass a normal mixture of class normmix and specify lambda and window as additianl parameters. Even if you have an intensity surface and passed it to rsppmix(), you can still overwrite it's intensity and window with additional parameters. See examples for details.

The number of points n follows Poisson distribution with intensity lambda * area of window.

When truncate = TRUE, a point pattern with n points will be generated from the mixture first. Then if not all the points are in the domain, it will generate more points until there are exactly n points in the domain. If truncate = FALSE is set, the returned point pattern will not check whether the points are inside the domain.

Value

A point pattern of class c("sppmix", "ppp").

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rsppmix(demo_intsurf)

# overwrite lambda or win
rsppmix(demo_intsurf, lambda = 200)
rsppmix(demo_intsurf, win = square(2))

# use normmix with additional parameters
rsppmix(demo_mix, lambda = 100, win = square(1))

# turn off truncation
rsppmix(demo_intsurf, truncate = FALSE)

wangyuchen/sppmix documentation built on May 4, 2019, 12:58 a.m.