freqMean {MQMF}R Documentation

freqMean calculates the mean and stdev of count data

Description

freqMean calculates the mean and stdev of count data it requires both the values and their associated counts and return a vector of two numbers.

Usage

freqMean(values, infreqs)

Arguments

values

the values for which there are counts

infreqs

the counts for each of the values empty cells can be either 0 or NA

Value

a vector containing the mean and st.dev.

Examples

vals <- c(1,2,3,4,5)
counts <- c(3,NA,7,4,2)
freqMean(vals,counts)  # should give 3.125 and 1.258306

[Package MQMF version 0.1.5 Index]