[R] gremlin in rep()

Richards, Tom richards at pci.upmc.edu
Fri Jul 28 23:06:13 CEST 2000


NO, sorry, I am using NT 4.0.  I guess I was confused by someone else's
writing Splus 2000.
Under NT 4.0, R 1.1.0, the following crashes R:

> rep(1:3, c(4,2,-6))

but I still do get this:

> rep(1:3,c(4,5,-6))
[1] 1 1 1

and the following:

>  rep(1:3,c(2,5,-6))
[1] 1

My apologies to the list.


> -----Original Message-----
> From: Yves Gauvreau [mailto:cyg at sympatico.ca]
> Sent: Friday, July 28, 2000 4:03 PM
> To: r-help
> Subject: Re: [R] gremlin in rep()
> 
> 
> 
> ----- Original Message -----
> From: "Richards, Tom" <richards at pci.upmc.edu>
> To: "'Liaw, Andy'" <andy_liaw at merck.com>; "r-help"
> <r-help at stat.math.ethz.ch>; "'Yves Gauvreau'" <cyg at sympatico.ca>
> Sent: Friday, July 28, 2000 3:40 PM
> Subject: RE: [R] gremlin in rep()
> 
> 
> >
> >
> > > -----Original Message-----
> > > From: Liaw, Andy [mailto:andy_liaw at merck.com]
> > > Sent: Friday, July 28, 2000 1:13 PM
> > > To: r-help; 'Yves Gauvreau'
> > > Subject: RE: [R] gremlin in rep()
> > >
> > >
> > > This is what I got in Splus 2000:
> > >
> > > > rep(1:3,c(4,5,-6))
> > > Error in rep.int: Negative values in "times" meaningless:
> > > rep.int(x, times)
> > >
> > > Seems like rep() is R is lacking some error traps.
> > >
> > > Andy
> >
> > That's interesting, because, under Splus 2000 (R 1.1.0), I get:
>                                                       ^^^^^^^^^^^^
> Did you mean Windows 2000?
> 
> YG
> 
> >
> > > rep(1:3,c(4,5,-6))
> > [1] 1 1 1
> >
> > >
> > > > ----------
> > > > From: Yves Gauvreau[SMTP:cyg at sympatico.ca]
> > > > Sent: Friday, July 28, 2000 11:51 AM
> > > > To: r-help
> > > > Subject: Re: [R] gremlin in rep()
> > > >
> > > > I tried it on NT 4 SP 6 R-1.1.0 and it crashes too.
> > > >
> > > > If you try rep(1:3, c(1,3)) you'll get:
> > > >
> > > > Error in rep(1:3, c(1, 3)) : invalid number of copies in "rep"
> > > >
> > > > It look's like R doesn't like the negative number in your
> > > case. It would
> > > > be
> > > > nice if it would give the same error message in both case.
> > > >
> > > > YG
> > > >
> > > > ----- Original Message -----
> > > > From: "Colin Farrow" <c.farrow at compserv.gla.ac.uk>
> > > > To: "r-help" <r-help at stat.math.ethz.ch>
> > > > Sent: Friday, July 28, 2000 10:29 AM
> > > > Subject: [R] gremlin in rep()
> > > >
> > > >
> > > > > the following occurred inadvertently and brought R-1.1.0 down
> > > > >
> > > > > rep(1:3, c(4,2,-6))
> > > > > Segmentation Fault (core dumped)
> > > > >
> > > > > platform i686-pc-linux-gnu
> > > > > arch     i686
> > > > > os       linux-gnu
> > > > > system   i686, linux-gnu
> > > > > status
> > > > > major    1
> > > > > minor    1.0
> > > > > year     2000
> > > > > month    June
> > > > > day      15
> > > > > language R
> > > > > also on Solaris2.7
> > > > >
> > > > > --
> > > > > Colin Farrow
> > > > > Computing Service, University of Glasgow, Glasgow G12 8QQ
> > > > > Tel: 0141 330 4862, c.farrow at compserv.gla.ac.uk
> > > > >
> > > >
> > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > > -.-.-.-.-.-.
> > > > -.-.-
> > > > > r-help 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-help-request at stat.math.ethz.ch
> > > > >
> > > >
> > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > > _._._._._._.
> > > > _.
> > > > _._
> > > > >
> > > >
> > > >
> > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > > -.-.-.-.-.-.
> > > > -.-.-
> > > > r-help 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-help-request at stat.math.ethz.ch
> > > >
> > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > > _._._._._._.
> > > > _._._
> > > >
> > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > > -.-.-.-.-.-.-.-.-
> > > r-help 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-help-request at stat.math.ethz.ch
> > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > > _._._._._._._._._
> > >
> >
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-.-.-
> r-help 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-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._._._._._
> 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list