tab_bins: Tabulate a vector of observations

View source: R/RcppExports.R

tab_binsR Documentation

Tabulate a vector of observations

Description

Tabulate a vector a whose values fall into a set of integers of maximum value nbins. This function does no argument checking so please ensure the maximum value of observations is not greater than nbins.

Usage

tab_bins(a, nbins)

Arguments

a

a set of observations

nbins

number of bins

Examples

nbin <- 10
a <- sample.int(n = nbin,size = 100,replace = TRUE)
tabulate(bin = a,nbins = nbin)
tab_bins(a = a,nbins = nbin)

mrc-ide/safir documentation built on Aug. 2, 2022, 10:47 a.m.