search for: avnam

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

Did you mean: avram
2010 Mar 31
2
Simplifying particular piece of code
...uot;ETM.AV120", stdev="ETM.SD120")) Is there a way to simplify this, some sort of loop? mrets is a zoo object. .AV120 and .SD120 are columns in this object. I need the exact .SR column names. This does not work: SRnames <- paste(colnames.mrets, ".SR", sep="") AVnames <- paste(colnames.mrets, ".AV120", sep="") SDnames <- paste(colnames.mrets, ".SD120", sep="") for(i in seq(SRnames)){ mrets <- merge(mrets, SRnames[i]=apply(mrets, 1, MyFunc, ret=AVnames[i], stdev=SDnames[i])) } Help much appreciated. Regards,...