search for: ddtd

Displaying 2 results from an estimated 2 matches for "ddtd".

Did you mean: dtd
2007 Jan 08
3
Speeding things up
Hi, is it possible to do this operation faster? I am going over 35k data entries and this takes quite some time. for(cnt in 2:length(sdata$date)) { if(sdata$value[cnt] < sdata$value[cnt - 1]) { sdata$ddtd[cnt] <- sdata$ddtd[cnt - 1] + sdata$value[cnt - 1] - sdata$value[cnt] } else sdata$ddtd[cnt] <- 0 } return(sdata) Thank you, Benjamin
2007 Jan 09
2
Logical operations or selecting data from data.frames
Hi all, why doesn't something like this does not work? speedy <- (sdata$VaR < sdata$DdtdAbs) && sdata$DdtdDuration >= qpois(pct,lambda) && sdata$Ddtd > MinDD or sdata$Ddtd[sdata$Ddtd > 0 && sdata$VaR < sdata$DdtdAbs] sdata looks like this: dataId date value Ddtd VaR DdtdAbs DdtdDuration 18948 79637 2004-07-27 10085.10...