Learn R Programming

NestedCategBayesImpute (version 1.2.1)

groupcount1D: 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.

Value

The count values.

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.

Examples

Run this code
# NOT RUN {
n <- 20
g <- sample.int(n,1000, replace = TRUE)
counts <- groupcount1D(g,n)
# }

Run the code above in your browser using DataLab