[R] gremlin in rep()

Yves Gauvreau cyg at sympatico.ca
Fri Jul 28 17:51:24 CEST 2000


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list