Skip to contents

This function calculates the mean density of hexagonal bins based on their neighboring bins.

Usage

compute_mean_density_hex(model_2d, b1 = 4)

Arguments

model_2d

A tibble that contains information about hexagonal bin centroids, including the hexagon ID and the standardised counts (w_h).

b1

The number of bins along the x-axis for the hexagonal grid.

Value

A tibble contains hexagonal IDs and the mean density of each hexagonal bin based on its neighboring bins.

Examples

compute_mean_density_hex(model_2d = scurve_model_obj$model_2d, b1 = 5)
#> Warning: There are hexagonal bins that don't have any neighbouring bins.
#> # A tibble: 26 × 2
#>    hb_id mean_density
#>    <int>        <dbl>
#>  1    42     NaN     
#>  2    49     NaN     
#>  3    52       0.012 
#>  4    53       0.011 
#>  5    56       0.012 
#>  6    57       0.0115
#>  7    67     NaN     
#>  8    69       0.011 
#>  9    70       0.014 
#> 10    86     NaN     
#> # ℹ 16 more rows