igroupAlls {Rigroup}R Documentation

calculates logical All for small integer groups of logical vectors

Description

This function allows a user to quickly calculate the logical All for each small integer group of a logical vector .

Usage

igroupAlls(x,i,na.rm=TRUE)

Arguments

x A logical data vector
i A small integer vector indicating group membership 1:ngroups
na.rm if TRUE remove NAs before use (defaults to TRUE)

Details

This package provides a fast implementation for calculating Alls for each group in a logical data vector where a small integer vector (1:number of groups) indicates group membership. na.rm is used to determine how NAs are handled. The return value is a vector with length(number of groups).

Value

igroupAlls: Returns a vector with length equal to the number of groups.

Author(s)

K. Hendricks with lots of help from B. Dunlap

References

See Also

igroupAnys igroupCounts igroupMaxs igroupMeans igroupMins igroupProds igroupRanges igroupSums

Examples

y <- rnorm(100)
i <- rep(1:25,4)
x <- (y > 1.0)
alls <- igroupAlls(x,i)
alls

[Package Rigroup version 0.81.0 Index]