Re: [R] ddply from plyr package - any alternatives?

2011-08-30 Thread Matthew Dowle
Adam, because I did not have time to entirely test Do you (or does your company) have an automated test suite in place? R 2.10.0 is nearly two years old, and R 2.12.0 is nearly one. Matthew AdamMarczak adam.marc...@gmail.com wrote in message news:1314385041626-3771731.p...@n4.nabble.com...

Re: [R] ddply from plyr package - any alternatives?

2011-08-26 Thread AdamMarczak
Thank you all for suggestions, they were great and informative. I will surely use data.tables in future when our server will be upgraded for now this is solution that I used. This solution performs exactly same task and produces exact same results at ddply. s - split(past,

Re: [R] ddply from plyr package - any alternatives?

2011-08-26 Thread Paul Hiemstra
On 08/26/2011 09:14 AM, AdamMarczak wrote: Thank you all for suggestions, they were great and informative. I will surely use data.tables in future when our server will be upgraded for now this is solution that I used. This solution performs exactly same task and produces exact same results

Re: [R] ddply from plyr package - any alternatives?

2011-08-26 Thread AdamMarczak
No, it's not much faster. I'd say it's faster about 10-15% in my case. I dont want neither plyr or data.table package because our software on the server does not support R version over 2.10 and both of them have dependency for R = 2.12. Also I do not want to use old archives because I did not

Re: [R] ddply from plyr package - any alternatives?

2011-08-25 Thread Tal Galili
Hi Adam, I don't think there is a faster alternative to plyr, without doing it in nested for loops, with a lot of book-keeping of variables (but if someone here were to correct me, I'd be happy to know). Two things to consider: 1) See if you can optimizing your function. (there is a lot of

Re: [R] ddply from plyr package - any alternatives?

2011-08-25 Thread Paul Hiemstra
Hi Adam, A recent thread on R-help deals exactly with your problem. In one of the responses I compare ddply to a number of alternative solutions (using ave and data.table) [1]. The test in the e-mail shows that for large amounts of unique categories, ddply is quite slow. Hadley (Wickham, author

Re: [R] ddply from plyr package - any alternatives?

2011-08-25 Thread AdamMarczak
Thank you for suggestions, apparently data.table is much quicker than ddply and it's fantastic to use. I forgot to mention in my topic I'm looking for alternative in R 2.10 version as on my platform our server runs older version of software which only support R up to version of R-2.10 (upgrade

Re: [R] ddply from plyr package - any alternatives?

2011-08-25 Thread Hadley Wickham
z - ddply(past, c(GEO_CNTRY_NAME,PROD_SEG_NAME),  function(x) summary(lm(VAL~fy,x))$r.squared) But when ave is not exactly doing what I need. Above code runs under a minute for my data set where as ave runs over 8 mins. It's hard to know without a reproducible example, but I doubt that ddply

[R] ddply from plyr package - any alternatives?

2011-08-24 Thread AdamMarczak
Hello everyone, I was asked to repost this again, sorry for any inconvenience. I'm looking replacement for ddply function from plyr package. Function allows to apply function by category stored in any column/columns. Regular loops or lapplys slow down greatly because my unique combination count