balance_points {onpoint} | R Documentation |
Balance number of points
balance_points(pattern, n, verbose = TRUE)
pattern |
ppp object. |
n |
Either an integer or a ppp object. |
verbose |
Print messages. |
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.
ppp
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)