[R] Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply

2004-04-08 Thread Brian . J . GREGOR
First, here's the problem I'm working on so you understand the context. I have a data frame of travel activity characteristics with 70,000+ records. These activities are identified by unique chain numbers. (Activities are part of trip chains.) There are 17,500 chains. I use the chain numbers as

Re: [R] Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply

2004-04-08 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: What I've found, however, is that it is not easy (or I have not found the easy way) to split a named vector into a list that retains the vector names. For example, splitting an unnamed vector (70,000+) based on the chain numbers takes very little time: