binnedMean: Calculate the mean for a matrix of binned data

Description Usage Arguments Value Examples

View source: R/extractMoments.r

Description

Calculate the mean for a matrix of binned data

Usage

1
2
binnedMean(counts, lowerBounds = seq(0, 95, 5), upperBounds = seq(5, 100,
  5))

Arguments

counts

a matrix or data.frame of binned data

lowerBounds

A vector of the lower cut points of the binnned data

upperBounds

A vector of the upper cutpoints of the original binnned data

Value

A vector of estimated means

Examples

1
2
3
4
5
6
7
upper <- seq(10, 100, 10)
lower <- seq(0, 90, 10)
counts2 <- c(1, 2, 1, 4, 4, 2, 0, 0, 0, 0)
counts3 <- c(1, 2, 1, 4, 4, 0, 0, 2, 0, 0)
detectNonContig(counts2)
detectNonContig(counts3)
binnedMean(rbind(counts2, counts3), lower, upper)

aserlich/gameify documentation built on Sept. 27, 2019, 5:41 p.m.