Learn R Programming

Rrepest (version 1.6.12)

weighted.std: Weighted standard deviation

Description

Computes the weighted standard deviation of a numeric vector.

Usage

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

Value

Scalar containing the standard deviation

Arguments

x

(numeric vector) Variable of interest for which to compute the standard deviation.

w

(numeric vector) Vector with the weights.

na.rm

(bool) if TRUE: Excludes missing values before computing the standard deviation

Examples

Run this code
data(df_talis18)

weighted.std(df_talis18$tt3g06d1, df_talis18$tt3g06e1)

Run the code above in your browser using DataLab