# Weighted variance

### Description

Computes a weighted variance of a numeric vector.

### Usage

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

### Arguments

`x` |
a |

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

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

`center` |
Optional |

`...` |
Not used. |

### Value

Returns a `numeric`

scalar.

### Missing values

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

is `TRUE`

, otherwise not.

### Author(s)

Henrik Bengtsson

### See Also

For the non-weighted variance, see `var`

.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.