[R-SIG-Finance] chart.PerformanceAnalytics(), character string is not in a standard unambiguous format
knguyen at cs.umb.edu
Thu Jun 18 00:01:16 CEST 2009
Thank you very much for all the help. Really appreciate it.
On Wed, Jun 17, 2009 at 5:21 PM, Peter Carl<peter at braverock.com> wrote:
>> index(z) = as.Date(index(z))
> That should revert your dates into a standard %F ISO-standard format.
this still doesn't do it. But finally I got my way. in case others
experience the same problem, this is what I do
> stb.agg <- aggregate(STB, as.yearmon, tail, 1) #my STB comes from quantmod's getSymbols(), wonder whether it is the cause of all problems...
> y <- Return.calculate(stb.agg$STB.Close, method=c("compound", "simple"))
> newx <- xts(coredata(y), order.by=as.Date(index(y))) # thanks Dirk !
> newy <- zoo(newx)
# I dont know why, but without the above I get an errors, and only one
chart is printed instead of 3
# like the one here
# > charts.PerformanceSummary(newx)
# Error in FUN(newX[, i], ...) : The selected column is not numeric
# In addition: Warning message:
# In max(i) : no non-missing arguments to max; returning -Inf
> charts.PerformanceSummary(newy) #pretty charts !
More information about the R-SIG-Finance