powered by
The function var.p computes a population variance. The function sd.p computes a population standard deviation.
var.p(x, wt = rep(1, length(x)), na.rm = FALSE)sd.p(x, wt = rep(1, length(x)), na.rm = FALSE)
sd.p(x, wt = rep(1, length(x)), na.rm = FALSE)
a numeric vector.
a numeric vector of weights. By default all elements of x are given the same weight.
a logical value indicating whether NA values should be stripped before the computation proceeds.
var.p: Population variance.
var.p
sd.p: Population standard deviation.
sd.p
# NOT RUN { var.p(1:6) var.p(x = 1:5, wt = 6:10) var.p(x = rep(1:5, 6:10)) sd.p(x = 1:5, wt = 6:10) sd.p(x = rep(1:5, 6:10)) # }
Run the code above in your browser using DataLab