weighted.sum {ggstats}R Documentation

Weighted Sum

Description

Weighted Sum

Usage

weighted.sum(x, w, na.rm = TRUE)

Arguments

x

a numeric vector of values

w

a numeric vector of weights

na.rm

a logical indicating whether to ignore NA values

Value

A numeric vector.

Examples

x <- 1:20
w <- runif(20)
weighted.sum(x, w)

[Package ggstats version 0.9.0 Index]