search for: listnamefunctions

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

2010 Feb 26
2
dramatic speed difference in lapply
...on 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==length(pivotColumns)) { # return(lapply(...