balance_points: balance_points

View source: R/balance_points.R

balance_pointsR Documentation

balance_points

Description

Balance number of points

Usage

balance_points(pattern, n, verbose = TRUE)

Arguments

pattern

ppp object.

n

Either an integer or a ppp object.

verbose

Print messages.

Details

The function balances out the number of points in the input pattern to either the provided number of points as integer or the same number of points if a ppp object is provided.

Value

ppp

Examples

set.seed(42)
input <- spatstat.random::rpoispp(lambda = 100)
input_b <- spatstat.random::rpoispp(lambda = 100)

balance_points(pattern = input, n = 110)
balance_points(pattern = input, n = input_b)


onpoint documentation built on March 7, 2023, 8:04 p.m.