Hello all,

Based on the help in ?xyplot, and this suggestion from another request:

http://stackoverflow.com/questions/20623041/r-formatted-auto-scaling-dat
e-axis-using-lattice

 

I was under the impression that this code should give me the desired x
axis label date format of: "1911-Jan".

 

dat  <- data.frame(var1=1:10,
date.val=as.POSIXct(seq(as.Date("1910/11/1"), as.Date("1911/8/1"),
"months") ))

barchart(var1~date.val, data=dat, horizontal=F,
scales=list(x=list(rot=45, format="%Y-%b")))

format(dat$date.val,"%Y-%b")

________________

It doesn't. Any suggestions as to the error in my ways?

Thanks very much.

Michael Folkes

 

 


	[[alternative HTML version deleted]]

