This function calculates the effective number of bins along the x and y axes
of a hexagonal grid.
Usage
calc_bins_y(bin1 = 4, r2, q = 0.1)
Arguments
- bin1
Number of bins along the x axis.
- r2
The ratio of the ranges of the original embedding components.
- q
The buffer amount as proportion of data range.
Value
A list of numeric values that represents the effective number of
bins along the y axis, height and, width of the hexagon.
Examples
scurve_umap_scaled_obj <- s_curve_obj$s_curve_umap_scaled_obj
lim1 <- scurve_umap_scaled_obj$lim1
lim2 <- scurve_umap_scaled_obj$lim2
r2 <- diff(lim2)/diff(lim1)
calc_bins_y(bin1 = 4, r2 = r2, q = 0.1)
#> $bin2
#> [1] 5
#>
#> $a1
#> [1] 0.3098829
#>
#> $a2
#> [1] 0.2683664
#>