[R] Inconsistent lattice scales$x$at, label behaviour for POSIXct
Deepayan Sarkar
deepayan.sarkar at gmail.com
Wed Feb 6 17:31:35 CET 2008
On 2/6/08, Alex Brown <alex at transitive.com> wrote:
> Here's a related problem that works for numeric but not for POSIXct
>
> I am seeing it where a panel has no at labels, but others do.
>
> This simple example only has one panel with no at labels.
>
> > baseval = 0;
> > xyplot(1:10 ~ (baseval + c(1:10)), scales=list(x=list
> + (at=list(c()), labels=list(c()), relation="free")), type="l")
>
> (works)
>
> baseval = as.POSIXct("2007-01-01");
> > xyplot(1:10 ~ (baseval + c(1:10)), scales=list(x=list
> + (at=list(c()), labels=list(c()), relation="free")), type="l")
> Error in as.POSIXct.default(at) :
> do not know how to convert 'at' to class "POSIXlt"
There may be a better long-term solution, but does this work for now?:
> xyplot(1:10 ~ (baseval + c(1:10)), scales=list(x=list
+ (at=list(baseval + c()), labels=list(c()), relation="free")), type="l")
-Deepayan
More information about the R-help
mailing list