Useful_functions: weighted mean and sd

Description Usage Arguments Value Examples

Description

just weighted mean and sd.

Usage

1

Arguments

x

vector to compute the mean over.

w

a vector of same length with the weigths of each element.

Value

a value with the weighted mean or sd.

Examples

1
2
weighted_mean(c(2,3,4), c(1,1,2))
weighted_sd(c(2,3,4), c(2,1,2))

ibartomeus/traitmatch documentation built on May 18, 2019, 1:29 a.m.