var-HistDat-method: Calculates the variance of observations in the histogram...

Description Usage Arguments Value Examples

Description

Calculates the variance of observations in the histogram dataset

Usage

1
2
## S4 method for signature 'HistDat'
var(x, y = NULL, na.rm = FALSE, use)

Arguments

x

An instance of the class HistDat

y

Provided for compatibility with stats::var(), but ignored

na.rm

Provided for compatibility with stats::var(), but ignored

use

Provided for compatibility with stats::var(), but ignored

Value

A numeric of length 1, holding the variance of all observations in the dataset

Examples

1
2
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
var(hd) # returns 0.6666667

HistDat documentation built on April 6, 2021, 9:08 a.m.