Learn R Programming

rmutil (version 1.1.9)

capply: A Fast Simplified Version of tapply

Description

a fast simplified version of tapply

Usage

capply(x, index, fcn=sum)

Value

Returns ans where for(i in split(x,index))ans <- c(ans,fcn(i)).

Arguments

x

x

index

index

fcn

default sum

Details

a fast simplified version of tapply