Displaying 1 result from an estimated 1 matches for "onecran".
Did you mean:
oneca
2012 Nov 10
2
For loop question
I have this code:
IEF <- to.monthly(IEF, indexAt="endof")
SPY <- to.monthly(SPY, indexAt="endof")
I would like to use a for loop instead of separate entries,
so the only code that needs to be modified is the list
of symbols.
symbols <- c("IEF", "SPY")
for(symbol in symbols) {
symbol <- to.monthly(symbol, indexAt="endof")
}
This