[R-SIG-Finance] addTA error message with text()

andrew morgan minkymorgan at gmail.com
Mon Jan 18 00:55:44 CET 2010


Hi list,

I'm trying to use text() with addTA + chartSeries to label points.
In testing this idea out, I'm getting an error message I don't know
how to interpret.
Can anyone explain what it means, or what I'm doing wrong here?

Contrived example, and error message below.

BARC <- get.hist.quote(instrument = "BARC.L", start = "2000-01-01",
end = "2010-04-04")
chartSeries(BARC)
addTA(text(index(BARC), BARC$Close, as.character(BARC$Close)))

# error is:
Error in addTA(text(index(BARC), BARC$Close, as.character(BARC$Close))) :
  non-xtsible data must match the length of the underlying series

In what way is the data not the same length?
Is there a simple way to label points?

many thanks

Andrew



More information about the R-SIG-Finance mailing list