avg_highd_data {quollr}R Documentation

Create a dataframe with averaged high-dimensional data

Description

This function calculates the average values of high-dimensional data within each hexagonal bin.

Usage

avg_highd_data(data, col_start = "x")

Arguments

data

A data frame containing the high-dimensional data and 2D embeddings with hexagonal bin IDs.

col_start

The text that begin the column name of the high-dimensional data

Value

A data frame with the average values of the high-dimensional data within each hexagonal bin.

Examples

num_bins_list <- calc_bins(data = s_curve_noise_umap_scaled, x = "UMAP1",
y = "UMAP2", hex_size = NA, buffer_x = NA, buffer_y = NA)
num_bins_x <- num_bins_list$num_x
num_bins_y <- num_bins_list$num_y
hb_obj <- hex_binning(data = s_curve_noise_umap_scaled,
x = "UMAP1", y = "UMAP2", num_bins_x = num_bins_x,
num_bins_y = num_bins_y, x_start = NA, y_start = NA, buffer_x = NA,
buffer_y = NA, hex_size = NA, col_start = "UMAP")
umap_data_with_hb_id <- as.data.frame(do.call(cbind, hb_obj$data_hb_id))
df_all <- dplyr::bind_cols(s_curve_noise_training |> dplyr::select(-ID), umap_data_with_hb_id)
avg_highd_data(data = df_all, col_start = "x")


[Package quollr version 0.1.1 Index]