View source: R/balance_check.R
check_balance | R Documentation |
Given a set of points and the polygons used to draw them, test the spatial balance of the point by comparing them to randomly located points generated within the polygons
check_balance( polygons, points, reps = 100, seed_number = 420, projection = "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0" )
polygons |
Polygon sf object. The polygons that were used to draw the points. This can either be the sample frame for the points or stratification polygons. |
points |
Point sf object. The points to be tested for spatial balance. |
reps |
Numeric. The number of random draws to make to compare against |
seed_number |
Numeric. The number to supply to |
projection |
CRS string or object. The projection to force all spatial objects into to for the purpose of compatibility. Defaults to |
method |
Character string. Which method to use for generating random sets of points to compare against. Either |
A data frame with the variables polygon
, point_count
(Number of points from points
occurring in the polygon), reps
(Number of random draws compared against), mean_arithmetic
(The arithmetic mean of the nearest neighbor distances for the points in points
), mean_geometric
(The geometric mean of the nearest neighbor distances for the points in points
), p_arithmetic
(The proportion of random point draws that had larger arithmetic mean neighbor distances than points
), and p_geometric
(The proportion of random point draws that had larger geometric mean neighbor distances than points
). We treat the p_geometric
as the p value for testing the H0 that points
is balanced.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.