ctabs: Cross Tabulation

Description Usage Arguments Details Value Examples

View source: R/ctabs.R

Description

Efficient weighted cross tabulation of two factors and a block

Usage

1
2
ctabs(ix, iy = integer(0), block = integer(0), weights = integer(0),
        subset = integer(0), checkNAs = TRUE)

Arguments

ix

a integer of positive values with zero indicating a missing.

iy

an optional integer of positive values with zero indicating a missing.

block

an optional blocking factor without missings.

weights

an optional vector of weights, integer or double.

subset

an optional integer vector indicating a subset.

checkNAs

a logical for switching off missing value checks.

Details

A faster version of xtabs(weights ~ ix + iy + block, subset).

Value

If block is present, a three-way table. Otherwise, a one- or two-dimensional table.

Examples

1
  ctabs(ix = 1:5, iy = 1:5, weights = 1:5 / 5)

libcoin documentation built on Dec. 14, 2017, 2:58 a.m.