weightedVariance: weightedVariance

View source: R/higherOrderFunctions.R

weightedVarianceR Documentation

weightedVariance

Description

the weightedVariance function

Usage

weightedVariance(x, y = NULL, w)

Arguments

x

x is a data vector

y

default to NULL, if given it is ignored

w

weight vector, values should be between 0 and 1

Value

numeric weighted variance value for x

Examples


x = rnorm(100)
w = runif(100)
weightedVariance(x,w = w)


shazanfar/scHOT documentation built on June 29, 2023, 5:29 p.m.