[R] Trouble using ohlcPlot

Neil Beddoe Neil.Beddoe at mbamfunds.com
Tue Jan 6 12:00:13 CET 2009


Hi,

I'm trying to create a time series that will work with ohlcPlot:

mts<-ts(data=c(results$OpenPrice,results$HighPrice,results$LowPrice, results$ClosePrice),c="mts",names=c("Open", "High", "Low","Close"))

ohlcPlot(mts) fails with: Error in if ((!is.mts(x)) || (colnames(x)[1] != "Open") || (colnames(x)[2] !=  : ...

is.mts(mts) returns true but colnames(mts) returns NULL.

I've trawled the archive for an example of using this function to no avail and it's not apparent from the docs what the data needs to look like.  Does anyone have an example of code that will work with this function?

Thanks

Neil

.

This message is intended only for the use of the person(s) to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any unauthorised use is strictly prohibited. If you are not the intended recipient, please contact the sender as soon as possible.

It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Marble Bar Asset Management LLP's  terms and conditions of business or client agreement letter. Any comments or statements made herein do not necessarily reflect those of Marble Bar Asset Management LLP.

Marble Bar Asset Management LLP is regulated and authorised by the FSA.




More information about the R-help mailing list