compute_hash: Compute a unique integer hash for each row of a data.frame

View source: R/pseudobulk.R

compute_hashR Documentation

Compute a unique integer hash for each row of a data.frame

Description

Treats the supplied columns as a composite key: rows that agree on every value in vars_use receive the same integer hash, distinct combinations receive distinct hashes. Used internally by collapse_counts() to identify pseudobulk groups, but exposed for callers who need the same indexing in their own code.

Usage

compute_hash(data_df, vars_use)

Arguments

data_df

A data.frame.

vars_use

Character vector of column names in data_df. Each column is coerced to factor before hashing.

Value

Integer vector of length nrow(data_df).

See Also

collapse_counts()


presto documentation built on Sept. 30, 2026, 5:13 p.m.