I have an xts/zoo object ESZ1:
> class(ESZ1)
[1] "xts" "zoo"
with
> class(time(ESZ1))
[1] "POSIXt" "POSIXct"
and
> colnames(ESZ1)
[1] "ESZ1.Open" "ESZ1.High" "ESZ1.Low" "ESZ1.Close" "ESZ1.Volume" "ESZ1.WAP" "ESZ1.hasGaps" "ESZ1.Count"
and I would like to plot it using the chartSeries function from the package quantmod. However, I get the following error:
> chartSeries(ESZ1)
Error in if (on == "years") { : missing value where TRUE/FALSE needed
Any ideas of what the problem could be would be greatly appreciated.
Additional question: Is there any documentation for how to adjust the axes/margins for chartSeries()? Currently my y-axis labels are partially cut off on the right-hand margin of the plot. I've tried using
mar = ...
in the argument list of chartSeries, but this did not change the resulting plot.