**Subject: **Re: Problem with plot.ts, "["

**From: **Peter Dalgaard BSA (*p.dalgaard@biostat.ku.dk*)

**Date: **Sat 03 Jul 1999 - 02:53:31 EST

**Next message:**Martyn Plummer: "segfault on Sparc Linux (RH6.0)"**Previous message:**maechler@stat.math.ethz.ch: "Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)"**Next in thread:**Adrian Trapletti: "Re: Problem with plot.ts, "[""**Maybe reply:**Peter Dalgaard BSA: "Re: Problem with plot.ts, "[""

Message-ID: <x2vhc3at84.fsf@blueberry.kubism.ku.dk>

Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> writes:

*> There seems to be a problem with plot.ts (R Version 0.64.2)
*

*>
*

*> >x<-cbind(1:10,2:11)
*

*> >x<-as.ts(x)
*

*> >plot(x)
*

*> Error: subscript (20) out of bounds, should be at most 10
*

*> >
*

*>
*

If it's any consolation to you, this didn't work in 0.64.1 and not in

0.65unstable either, although it gets a different error there...

*> The problem is located in "[.ts":
*

*>
*

*> > x<-cbind(1:10,2:11)
*

*> > x[is.finite(x)]
*

*> [1] 1 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 9 10 11
*

*> > x<-as.ts(x)
*

*> > x[is.finite(x)]
*

*> Error: subscript (20) out of bounds, should be at most 10
*

*> >
*

*>
*

*> and there (in "[.ts") the following statement gives the error:
*

Actually, I suspect that the mistake is to do x[is.finite(x)] in the

first place. It is used to calculate ranges for plot limits, but one

might better have used range(x,finite=TRUE) for that.

-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

**Next message:**Martyn Plummer: "segfault on Sparc Linux (RH6.0)"**Previous message:**maechler@stat.math.ethz.ch: "Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)"**Next in thread:**Adrian Trapletti: "Re: Problem with plot.ts, "[""**Maybe reply:**Peter Dalgaard BSA: "Re: Problem with plot.ts, "[""

*
This archive was generated by hypermail 2b25
: Tue 04 Jan 2000 - 14:16:05 EST
*