| select_points | R Documentation |
For an area frame of square cells (segments) selected with select_units(),
draws points_per_cell uniform random points inside each sampled cell. In
the field, each point identifies the field (and so the establishment) it
falls on; an establishment can be hit several times. The point density of
a cell, pi * points / area, is what expected_hits() and
point_estimator() need.
select_points(
sample,
points_per_cell,
cell_size,
layout = c("random", "systematic"),
seed = 1
)
sample |
A |
points_per_cell |
Points per sampled cell: a single number, a vector named by stratum (for example more points where agricultural use is more intense), or the name of a column of the sample. |
cell_size |
Side of the square cells, in the units of the coordinates
(one number, or |
layout |
|
seed |
Seed. |
A tibble of class fieldopt_points with one row per point: unit
(the cell), point, the two coordinates, pi_cell, points_in_cell and
density (expected points per unit area of the cell).
cells <- expand.grid(x = 1:10, y = 1:10)
cells$unit <- paste0("c", 1:100)
s <- select_units(cells, n = 12, seed = 2)
p <- select_points(s, points_per_cell = 9, cell_size = 1, layout = "systematic")
nrow(p)
head(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.