powered by
Balance number of points
balance_points(pattern, n, verbose = TRUE)
ppp
ppp object.
Either an integer or a ppp object.
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.
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)
Run the code above in your browser using DataLab