[R] POSIX and identify
Petr Pikal
petr.pikal at precheza.cz
Tue Sep 16 10:37:04 CEST 2003
Hi
On 15 Sep 2003 at 20:09, Troels Ring wrote:
> Thanks a lot, but something else may be awry ? - at least
> as.POSIXct(Dato) although now of length 84 still elicits a report of
> different argument lengths even though length now is 84 for both
> arguments.
try
plot(as.POSIXct(Dato),Crea))
and
then
identify(as.POSIXct(Dato),Crea))
> > identify(as.POSIXct(Dato),Crea,5,plot=TRUE)
> Error in identify(x, y, as.character(labels), n, plot, offset) :
> different argument lengths
> > length(as.POSIXct(Dato))
> [1] 84
> > length(Crea)
> [1] 84
> > length(Dato)
> [1] 9
>
> Best wishes
> Troels Ring
> Aalborg
>
> At 18:43 9/15/03, you wrote:
> >You need to convert to POSIXct before using Dato in identify().
> >This will work as you expected in R 1.8.0.
> >
> >On Mon, 15 Sep 2003, Troels Ring wrote:
> >
> > > Dear Friends, I'm using winXP and R 1.7.1 and plotting some data
> > > using dates on the x-axis, and wanted to use identify to show some
> > > points but
> > was
> > > told by identify that the x and y vectors producing a fine graph
> > > with 84 points were not equal in length. Below are the Dato for
> > > date - and length(Dato) finds 9 but str finds 84 as known. Will
> > > identify not work in this context ? Best wishes Troels Ring
> > > Aalborg, Denmark
> > > > Dato
> > > [1] "2000-01-04" "2000-01-07" "2000-01-10" "2000-01-13"
> > > "2000-01-17" .......
> > > [81] "2003-04-23" "2003-05-14" "2003-07-30" "2003-08-14"
> > > > length(Dato)
> > > [1] 9
> > > > str(Dato)
> > > `POSIXlt', format: chr [1:84] "2000-01-04" "2000-01-07"
> > > "2000-01-10" "2000-01-13" ...
> >
> >--
> >Brian D. Ripley, ripley at stats.ox.ac.uk
> >Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> >University of Oxford, Tel: +44 1865 272861 (self) 1
> >South Parks Road, +44 1865 272866 (PA) Oxford OX1
> >3TG, UK Fax: +44 1865 272595
> >
> >______________________________________________
> >R-help at stat.math.ethz.ch mailing list
> >https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Cheers
Petr Pikal
petr.pikal at precheza.cz
More information about the R-help
mailing list