- data
sf data frame containing points.
- cell_size
numeric value specifying the size of each equally
spaced grid cell, using the same units (metres, degrees, etc.) as used in
the sf data frame given in the data argument. Ignored if
grid is not NULL. If this argument and grid are
NULL (the default), the cell size will be calculated automatically
(see Details).
- grid_type
character specifying whether the grid should be made
up of squares ("rect", the default) or hexagons ("hex").
Ignored if grid is not NULL.
- kde
TRUE (the default) or FALSE indicating whether
kernel density estimates (KDE) should be produced for each grid cell.
- bandwidth
numeric value specifying the bandwidth to be used in
calculating the kernel density estimates. If this argument is NULL
(the default), the bandwidth will be specified automatically using the mean
result of bandwidth.nrd called on the x and
y co-ordinates separately.
- bandwidth_adjust
single positive numeric value by which the
value of bandwidth is multiplied. Useful for setting the bandwidth
relative to the default.
- grid
sf data frame containing polygons, which will
be used as the grid for which counts are made.
- weights
NULL or the name of a column in data to be used
as weights for weighted counts and KDE values.
- nb_dist
The distance around a cell that contains the neighbours of
that cell, which are used in calculating the statistic. If this argument is
NULL (the default), nb_dist is set as cell_size *
sqrt(2) so that only the cells immediately adjacent to each cell are
treated as being its neighbours.
- include_self
Should points in a given cell be counted as well as
counts in neighbouring cells when calculating the values of
Gi*
(if include_self = TRUE, the default) or
Gi*
(if include_self = FALSE) values? You are unlikely to want to change
the default value.
- p_adjust_method
The method to be used to adjust p-values for
multiple comparisons. NULL (the default) uses the default method
used by p.adjust, but any of the character values in
stats::p.adjust.methods may be specified.
- transform
the underlying SpatialKDE package cannot calculate kernel
density for lon/lat data, so this must be transformed to use a projected
co-ordinate reference system. If this argument is TRUE (the
default) and sf::st_is_longlat(data) is TRUE, data
(and grid if provided) will be transformed automatically using
link{st_transform_auto} before the kernel density is estimated and
transformed back afterwards. Set this argument to FALSE to suppress
automatic transformation of the data.
- quiet
if set to TRUE, messages reporting the values of any
parameters set automatically will be suppressed. The default is
FALSE.
- ...
Further arguments passed to kde or
ignored if kde = FALSE.