weighted.sum: Weighted Sum

View source: R/weighted_sum.R

weighted.sumR 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)

ggstats documentation built on April 12, 2025, 1:29 a.m.