fquantile_byid: Compute Quantiles by Group

View source: R/RcppExports.R

fquantile_byidR Documentation

Compute Quantiles by Group

Description

This function computes quantiles for subsets of a numeric vector defined by an ID vector. The input vector must be sorted by the ID vector. Optionally, the results can be rounded.

Usage

fquantile_byid(x, q, id, rounding = FALSE, na_rm = TRUE)

Arguments

x

A numeric vector from which quantiles are computed.

q

A numeric vector of probabilities for which quantiles are desired.

id

A string vector representing group identifiers. The vector x must be sorted by id.

rounding

Logical flag indicating whether to round the quantiles (default is false).

na_rm

Logical flag indicating whether to remove NA values (default is true).

Value

A list where the first element is a vector of group IDs and subsequent elements are numeric vectors of computed quantiles for each group.


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.