Skip to contents

Compute the mean of a data set represented by the pair of the numeric vectors data and optionally its frequency vector freq.

Usage

histmean(data, freq = NULL)

Arguments

data

A numeric vector of a data set.

freq

A frequency vector corresponding to the data vector. The default value is NULL, which means all frequencies are one.

Value

The mean of a data set.

See also

Examples

## Without a frequency data
histmean(mix2gauss$n200)
#> [1] 0.4503117
## With a frequency data
histmean(mix2gaussHist$n200p, mix2gaussHist$n200f)
#> [1] 0.2994202