Aggregate discrete values
aggregate_weights.Rd
Aggregates discrete values together with their weights into a data frame or tibble.
Arguments
- y
Vector of outcomes.
- weights
Vector of weights, one for each of
y
. These need not sum to one, but must not be negative.- sum_to_one
Logical; should the weights be normalized to sum to 1? Default is FALSE.