Description Usage Arguments Value Missing values Author(s) See Also

Computes a weighted variance of a numeric vector.

1 2 | ```
## Default S3 method:
weightedVar(x, w, na.rm=FALSE, center=NULL, ...)
``` |

`x` |
a |

`w` |
a vector of weights the same length as |

`na.rm` |
a logical value indicating whether |

`center` |
Optional |

`...` |
Not used. |

Returns a `numeric`

scalar.

Missing values are dropped at the very beginning, if argument
`na.rm`

is `TRUE`

, otherwise not.

Henrik Bengtsson

For the non-weighted variance, see `var`

.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.