% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/column.R
\name{weighted_rollup}
\alias{weighted_rollup}
\title{Weighted-average rollup function factory}
\usage{
weighted_rollup(weight_key)
}
\arguments{
\item{weight_key}{Character. The value key to use as weights (e.g.
\code{"market_cap"}). Each child's value for this key is used as its weight.}
}
\value{
A function \verb{function(vals, child_values) -> numeric}.
}
\description{
Returns a rollup function for use as \code{rollup_fn} in \code{\link[=col_def]{col_def()}}. Computes
the weighted average of \code{vals} using another key's values as weights.
}
