vtreat (version 1.6.2)

.wmean: Compute weighted mean

Description

Compute the weighted mean of x.

Usage

.wmean(x, weights = NULL)

Arguments

x

numeric vector without NA to compute mean of

weights

weights vector (or NULL)

Value

weighted mean

Examples

Run this code
# NOT RUN {
.wmean(c(1, 2, 3))

# }

Run the code above in your browser using DataLab