[R] ddply from plyr package - any alternatives?

AdamMarczak adam.marczak at gmail.com
Thu Aug 25 11:23:49 CEST 2011


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 is currently impossible
because of all applications that run on it)

Ave function does not suffice as what I'm trying to do is:

z1 <- past[, c(summary(lm(VAL~fy))$r.squared)
  , by = list(GEO_CNTRY_NAME,PROD_SEG_NAME)]

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.

Any ideas/help is greatly appreciated.


--
View this message in context: http://r.789695.n4.nabble.com/ddply-from-plyr-package-any-alternatives-tp3765936p3767764.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list