Population Variance

pop_var(x, na.rm = FALSE)

Arguments

x

a numeric vector, matrix, or data frame.

na.rm

a logical: should NA values be removed?

Value

The population variance of x

Examples

pop_var(1:10)
#> [1] 8.25
8.25
#> [1] 8.25
pop_var(c(1:10, NA))
#> [1] NA
NA
#> [1] NA
pop_var(c(1:10, NA), na.rm = TRUE)
#> [1] 8.25
8.25
#> [1] 8.25