`ratio` <-
function (d, w, num, den)
###########################################
# Ratio estimator for totals (or means) #
# of quantitative variables. #
###########################################
{
sum(d[, w] * d[, num])/sum(d[, w] * d[, den])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.