Skip to content

Open to Close to Open data transformation (quantmod, xts and possibly zoo) + chart.TimeSeries

2 messages · Costas Vorlow, Peter Carl

#
Thanks again.

One more point:

When I try

chart.TimeSeries(newdata, date.format="%d-%m-%y", period.areas =
list(c("03-01-2011","05-06-2011")), period.color = "blue", lwd = 2)

I can't get the event period shadings.

This has to do I guess with the fact that 2 prices have the same data
though different hourly time signature.

Is this correct and how do I rectify it?

I've been trying around with formats but no result so far.
On 23 September 2011 14:56, G See <gsee000 at gmail.com> wrote:

  
    
1 day later
#
You may have already figured this out, but the dates have to appear in the
timeseries at the same granularity you are looking to match.
list(c("03-01-2011","05-06-2011")), period.color = "blue", lwd = 2)

should be...
list(c("2011-01-03","2011-06-06")), period.color = "blue", lwd = 2)

... where the list of areas is specified in 8601 format.  Also note that
the fifth of June does not appear in your data series.  If you are looking
to match at a higher granularity, then period.areas = list(c("2011-01",
"2011-05")) would also work.

HTH,

pcc