[R] format.dates, chron and Hmisc

Deepayan Sarkar deepayan.sarkar at gmail.com
Tue Jun 12 20:17:35 CEST 2007


On 6/10/07, R.H. Koning <r.h.koning at rug.nl> wrote:
> Hello, I have some problems in using chron, Hmisc, and lattice. First,
> using both chron and Hmisc, I get an error message when describing data:
>
> df$Date <- chron(df$Date,format=c("d/m/y"))
>  > ll <- latex(describe(df),file="..//text//df.tex")
> Error in formatDateTime(dd, atx, !timeUsed) :
>         could not find function "format.dates"
>
> Then, using a chron object and lattice, I get
>
>  > plot.a <- xyplot(theta~Date|team,data=op.df.long,
> +  strip = function(bg, ...) strip.default(bg = 'transparent', ...),
> +  panel=function(x,y,...){
> +   panel.xyplot(x,y,cex=0.4,col="black",...)
> +   panel.loess(x,y,span=0.3,col="black",...)
> +   panel.abline(h=0)
> +  })
>  > print(plot.a)
> Error in pretty(rng, ...) : unused argument(s) (format.posixt = NULL)

This one is a bug in lattice (there is some code to support chron
objects, but evidently not many people use it). I will include a fix
in the next update.

-Deepayan



More information about the R-help mailing list