Skip to contents

Extract hexagonal bin mean coordinates and the corresponding standardize counts.

Usage

extract_hexbin_mean(data_hb, counts_df, centroids_df)

Arguments

data_hb

A tibble with embedding components and hexagonal bin IDs.

counts_df

A tibble that contains hexagon IDs with the standardise number of points within each hexagon.

centroids_df

A tibble that contains all hexagonal bin centroid coordinates with hexagon IDs.

Value

A tibble contains hexagon ID, bin mean coordinates, and standardize counts.

Examples

all_centroids_df <- s_curve_obj$s_curve_umap_hb_obj$centroids
counts_df <- s_curve_obj$s_curve_umap_hb_obj$std_cts
umap_with_hb_id <- s_curve_obj$s_curve_umap_hb_obj$data_hb_id
extract_hexbin_mean(data_hb = umap_with_hb_id, counts_df = counts_df,
centroids_df = all_centroids_df)
#> # A tibble: 240 × 6
#>    hexID   c_x   c_y bin_counts std_counts drop_empty
#>    <int> <dbl> <dbl>      <int>      <dbl> <lgl>     
#>  1     1    NA    NA         NA         NA TRUE      
#>  2     2    NA    NA         NA         NA TRUE      
#>  3     3    NA    NA         NA         NA TRUE      
#>  4     4    NA    NA         NA         NA TRUE      
#>  5     5    NA    NA         NA         NA TRUE      
#>  6     6    NA    NA         NA         NA TRUE      
#>  7     7    NA    NA         NA         NA TRUE      
#>  8     8    NA    NA         NA         NA TRUE      
#>  9     9    NA    NA         NA         NA TRUE      
#> 10    10    NA    NA         NA         NA TRUE      
#> # ℹ 230 more rows