I'm having trouble understanding what tapply
function does when the FUN
argument is null
.
The documentation says:
If FUN is NULL, tapply returns a vector which can be used to subscript the multi-way array tapply normally produces.
For example, what does the following example of the documentation do?
ind <- list(c(1, 2, 2), c("A", "A", "B"))
tapply(1:3, ind) #-> the split vector
I don't understand the results:
[1] 1 2 4
Thanks.