groupcount1D {NestedCategBayesImpute}R Documentation

Generate histogram count for an integer-valued vector.

Description

Generate histogram count for an integer-valued vector.

Usage

groupcount1D(g, n)

Arguments

g

An integer-valued input vector. The max value in g is n.

n

The max value in g.

Details

This is implemented as an utility function for 1D histgram count. For efficiency, it does not check if the maximum value in the input vector exceeds the maximum value specified.

Value

The count values.

Author(s)

Quanli Wang

Examples

n <- 20
g <- sample.int(n,1000, replace = TRUE)
counts <- groupcount1D(g,n)

[Package NestedCategBayesImpute version 1.2.1 Index]