powered by
Calculates the variance of observations in the histogram dataset
# S4 method for HistDat var(x, y = NULL, na.rm = FALSE, use)
An instance of the class HistDat
Provided for compatibility with stats::var(), but ignored
stats::var()
A numeric of length 1, holding the variance of all observations in the dataset
# NOT RUN { hd <- HistDat(vals = 1:3, counts = c(1, 2, 1)) var(hd) # returns 0.6666667 # }
Run the code above in your browser using DataLab