Displaying 1 result from an estimated 1 matches for "getdivadjseries".
2009 Jun 25
1
apply on xts
Hi,
I do not understand why after I called apply on a function that returns an
xts (getIdvAdjSeries) it returns a matrix whose columns are just numeric
value of time series in xts instead of a list of xts objects.
Basically, I called the following:
apply(matrix(tickers,ncol=1),1,FUN=getDivAdjSeries)
getDivAdjSeries <- function(ticker) {
seriesName <- paste(ticker,"Adjusted",sep=".");
command <- parse(text=paste(ticker,"[,'",seriesName,"']",sep=""));
s <- eval(command);
dimnames(s)[[2]] <- ticker;
com...