sp.table: A 'special' table function optimized for integers

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A function similar to the table function that works only for integers for added speed.

Usage

1
sp.table(y, y.unique, pct = FALSE)

Arguments

y

An integer vector

y.unique

The unique values of y whose occurence in y will be counted

pct

=TRUE report the counts as percentages

Details

y.unique may contain values that are not in y.

Value

An integer vector containing the counts or percentages of each of the elements of y.unique

Author(s)

Landon Sego

See Also

table

Examples

1
2
3
x <- sample(c(rep(1,5), rep(2,3)))
sp.table(x, 1:2)
sp.table(x, 1:3)

pnnl/qFeature documentation built on May 25, 2019, 10:22 a.m.