Hello again, if someone can help with the ohlcPlot problem i would be very grateful indeed ! At least i think its a bit weird, both commands used are within the Rmetrics suite, the data downloaded with yahooSeries should be compatible with ohlcPlot. Should i omit 'volume' perhaps ?
Gex wrote:
Hello (again), i have a small problem with the ohlcPlot fSeries package
using yahooImport.
I've tried with returnClass timeSeries, ts, data.frame and matrix.
I also get the same error using get.hist.quote returnClass zoo.
sp500 <-
yahooSeries("^GSPC",nDaysBack=252*2,quote=c("Open","High","Low","Close","Volume"),
aggregation="d", returnClass = "timeSeries")
str(sp500)
Formal class 'timeSeries' [package "fSeries"] with 8 slots
..@ Data : num [1:360, 1:5] 1272 1259 1242 1236 1234 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : atomic [1:360] 2006-07-12 2006-07-13 2006-07-14 2006-07-17
...
.. .. .. ..- attr(*, "control")= Named chr "GMT"
.. .. .. .. ..- attr(*, "names")= chr "FinCenter"
.. .. ..$ : chr [1:5] "^GSPC.Open" "^GSPC.High" "^GSPC.Low"
"^GSPC.Close" ...
..@ positions : atomic [1:360] 2006-07-12 2006-07-13 2006-07-14
2006-07-17 ...
.. ..- attr(*, "control")= Named chr "GMT"
.. .. ..- attr(*, "names")= chr "FinCenter"
..@ format : chr "%Y-%m-%d"
..@ FinCenter : chr "GMT"
..@ units : chr [1:5] "^GSPC.Open" "^GSPC.High" "^GSPC.Low"
"^GSPC.Close" ...
..@ recordIDs :'data.frame': 0 obs. of 0 variables
..@ title : chr "Time Series Object"
..@ documentation: chr "Wed Nov 28 22:53:50 2007"
then the error:
ohlcPlot(sp500)
Error in ohlcPlot(sp500) : x is not a open/high/low/close time series Thank you.
View this message in context: http://www.nabble.com/ohlcPlot-tp14011629p15667519.html Sent from the Rmetrics mailing list archive at Nabble.com.