neighbourhoods: hexagonal bins

Description Usage Arguments Value Examples

View source: R/Distances.R

Description

hexagonal bins

Usage

1
2
3
4
neighbourhoods(
  U,
  delta = (range(U$x, na.rm = TRUE)[2] - range(U$x, na.rm = TRUE)[1])/100
)

Arguments

U

: a dataframe containing the numerical variables x and y

delta:

controls the bin diameter

Value

a hexbin object hexagonal bins

Examples

1
2
3
4
5
6
# plot the hex bins of cumbria
data(U,package="Strategy")
library("hexbin")
plot(neighbourhoods(U,.1))
plot(neighbourhoods(U,.01))
plot(neighbourhoods(U,.001))

DanielBonnery/Strategy documentation built on Dec. 17, 2021, 4:03 p.m.