Skip to content
Prev 3980 / 15274 Next

Chart formats

Hi all,

I am trying to get a chart with "years" shown only on the x-axis (e.g. 2005,2006,2007). However, xts and ts always show the day, month and year as shown below. I can hardly believe, the only solution is manually creating a character vector. Does anyone know a smarter idea? Or is there a library I might have overseen providing this functionality?

library(xts)
library(quantmod)
getSymbols("GS")
plot(GS[,1],major.ticks='years')

Thanks,
Heiko
--