Re: [R] Inconsistent lattice scales$x$at, label behaviour for POSIXct

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Wed, 6 Feb 2008 08:31:35 -0800

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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 06 Feb 2008 - 16:40:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 17:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive