This function calculates the mean density of hexagonal bins based on their neighboring bins.
Value
A tibble contains hexagonal IDs and the mean density of each hexagonal bin based on its neighboring bins.
Examples
num_bins_x <- 4
df_bin_centroids <- df_bin_centroids <- s_curve_obj$s_curve_umap_model_obj$df_bin_centroids
compute_mean_density_hex(df_bin_centroids, bin1 = num_bins_x)
#> # A tibble: 15 × 2
#> hb_id mean_density
#> <int> <dbl>
#> 1 1 0.610
#> 2 2 0.394
#> 3 3 0.375
#> 4 5 0.397
#> 5 6 0.393
#> 6 7 0.337
#> 7 8 0.555
#> 8 11 0.785
#> 9 12 0.360
#> 10 13 0.383
#> 11 14 0.556
#> 12 15 0.390
#> 13 17 0.567
#> 14 18 0.464
#> 15 19 0.705