Full_Name: Yutaka Hamaoka Version: 1.8.1(Raqua) OS: OSX 10.3 Submission from: (NULL) (218.140.186.74) Hi, I've found "stem()" falls into infinit loop when x has no variance. Let's try x<-matrix(1,nrow=100,ncol=1) stem(x) Then you will get infinit flow. The decimal point is 9 digit(s) to the left of the | -214748360 | -214748358 | -214748356 | -214748354 | -214748352 | -214748350 | -214748348 | -214748346 | -214748344 | -214748342 | ....
On Thu, 4 Mar 2004 13:28:16 +0100 (CET), hamaoka@fbc.keio.ac.jp wrote>I've found "stem()" falls into infinit loop when x has no variance.Let's try> >x<-matrix(1,nrow=100,ncol=1) >stem(x)I get a different wrong answer in 1.8.1 for Windows:> x<-matrix(1,nrow=100,ncol=1) > stem(x)The decimal point is 9 digit(s) to the left of the | -214748360 | -8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8-8+20 No loop, but not right either. The same results show up in r-patched and r-devel. I'll try to track it down... Duncan Murdoch
I don't get a loop on any of my machines, but the problem is integer overflow. Note that> stem(rep(1, 100), atom=1e-7)The decimal point is 8 digit(s) to the left of the | 100000000 | 00000000000000000000000000000000000000000000000000000000000000000000+20> stem(rep(0.1, 100))The decimal point is 9 digit(s) to the left of the | 100000000 | 00000000000000000000000000000000000000000000000000000000000000000000+20 both work. Of course, with exactly equality, one should do something more sensible, and I have done that in R-devel. On Thu, 4 Mar 2004 hamaoka@fbc.keio.ac.jp wrote:> Full_Name: Yutaka Hamaoka > Version: 1.8.1(Raqua) > OS: OSX 10.3 > Submission from: (NULL) (218.140.186.74) > > > Hi, > > I've found "stem()" falls into infinit loop when x has no variance. Let's try > > x<-matrix(1,nrow=100,ncol=1) > stem(x) > > Then you will get infinit flow. > > The decimal point is 9 digit(s) to the left of the | > > -214748360 | > -214748358 | > -214748356 | > -214748354 | > -214748352 | > -214748350 | > -214748348 | > -214748346 | > -214748344 | > -214748342 | > > > .... > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley@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
Could you please check whether this works properly? x<-matrix(1,nrow=100,ncol=1) stem(x, atom=1.e-7) The problem appears to be an integer overflow; this fixes it on my system. Duncan Murdoch
>Could you please check whether this works properly? > >x<-matrix(1,nrow=100,ncol=1) >stem(x, atom=1.e-7) > >The problem appears to be an integer overflow; this fixes it on my >system. > >Duncan MurdochHere it is,> x<-matrix(1,nrow=100,ncol=1) > stem(x, atom=1.e-7)The decimal point is 8 digit(s) to the left of the | 100000000 | 000000000000000000000000000000000000000000000000000000000000 00000000+20 YH