search for: rocfunc

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

Did you mean: recfunc
2013 May 16
1
To List or Not To List
...s into a list and then process them, putatively more quickly than going data frame by data frame, which does not require the up-front assembly. A look at the empirical results shows executing this set of functions df by df consumes 44.15 of elapsed time. > ptm <- proc.time() > > > ROCFunc<-function(DF){ + if(nrow(DF)>129){DF$Mo129<-ROC(DF[,"Close"],n=129)} + if(nrow(DF)> 65){DF$Mo65 <-ROC(DF[,"Close"],n= 65)} + if(nrow(DF)> 21){DF$Mo21 <-ROC(DF[,"Close"],n= 21)} + if(nrow(DF)> 10){DF$Mo10 <-ROC(DF[,"Close"],n= 10)} +...