Re: [R] Selecting ranges of dates from a dataframe

2011-03-11 Thread Benjamin Stier
Hi Francisco, Thanks for your solution. It runs pretty fast compared to my for loop. Here is a comparison of system.time(): system.time(splitVals <- by(serv, dates, aggregateDf )) user system elapsed 1.129 0.218 1.348 system.time(... my long for loop...) user system elapsed 276.

[R] Selecting ranges of dates from a dataframe

2011-03-10 Thread Benjamin Stier
Hello list! I have a data.frame which looks like this: > serv datum op.read op.write read write 1 2011-01-29 10:00:00 00 0 0 2 2011-01-29 10:00:01 00 0 0 3 2011-01-29 10:00:02 00 0 0 4 2011-01-29 10:00:03