search for: ddplywrapper2fast

Displaying 1 result from an estimated 1 matches for "ddplywrapper2fast".

2010 Feb 26
2
dramatic speed difference in lapply
So I have a function that does lapply's for me based on dimension. Currently only works for length(pivotColumns)=2 because I haven't fixed the rbinds. I have two versions. One runs WAYYY faster than the other. And I'm not sure why. Fast Version: fedb.ddplyWrapper2Fast <- function(data, pivotColumns, listNameFunctions, ...){ lapplyFunctionRecurse <- function(cdata, level=1, ...){ if(level==1){ return(lapply(split(seq(nrow(cdata)),cdata[,pivotColumns[level]], drop=T), function(x) lapplyFunctionRecurse(x, level+1, ...))) } else if (level=...