Learn R Programming

vtreat (version 1.6.4)

.wmean: Compute weighted mean

Description

Compute the weighted mean of x.

Usage

.wmean(x, weights = NULL)

Value

weighted mean

Arguments

x

numeric vector without NA to compute mean of

weights

weights vector (or NULL)

Examples

Run this code

.wmean(c(1, 2, 3))

Run the code above in your browser using DataLab