search for: tsrsub

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

2009 Aug 04
0
Efficient coding
...ns over variable sp (must process several thousands). The Rprof() indicates that the problem is the use of gc(). Can someone indicate what I have to take care of not to call gc() so often? Thanks in advance ----- toProcess <- unique(tsr$cSpillingPointID) first <- 1 for(sp in toProcess) { tsrSUB <- tsr[tsr$cSpillingPointID == sp,] dmnd <- tsrSUB[is.na(tsrSUB$cDeviceClass),] if(nrow(dmnd) != 1) warning(paste("cSpillingPointID", sp, "has more than one demand time Series. Used first.")) tsrValCount <- getTimeSeries(chn, tsrSUB[!is.na(tsrSUB$cDeviceClass...