
Find the number of bins required to achieve required number of non-empty bins.
Source:R/03_2d.R
find_non_empty_bins.Rd
This function determines the number of bins along the x and y axes to obtain a specific number of non-empty bins.
Value
The number of bins along the x and y axes needed to achieve a specific number of non-empty bins.
Examples
scurve_umap_scaled_obj <- s_curve_obj$nldr_scaled_obj
lim1 <- scurve_umap_scaled_obj$lim1
lim2 <- scurve_umap_scaled_obj$lim2
r2 <- diff(lim2)/diff(lim1)
find_non_empty_bins(data = s_curve_noise_umap_scaled, non_empty_bins = 5,
r2 = r2)
#> Error in if (r2 > check_factor) { a1 <- (1 + 2 * q)/(bin1 - 1)} else { a1 <- (2 * (r2 + q * (1 + r2)))/(sqrt(3) * (bin2 - 1))}: argument is of length zero