Skip to content

Bug on sample (PR#219)

2 messages · jperez@cesma.usb.ve, Peter Dalgaard

#
Full_Name: Jose M. Perez
Version: 0.64.2
OS: Linux/x86
Submission from: (NULL) (159.90.200.68)


sample(1,1,prob=c(1))
Causes a core dump.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
jperez@cesma.usb.ve writes:
...confirmed. prob=1 is not necessary, sample(1,1,,.1) crashes too.

Cause: revsort() does horrible things if n <= 1. Will fix.