[Rd] rmultinom has a bug. (PR#4431)

maechler at stat.math.ethz.ch maechler at stat.math.ethz.ch
Mon Oct 6 13:33:56 MEST 2003

>>>>> "skon" == skon  <skon at stats.snu.ac.kr>
>>>>>     on Mon, 6 Oct 2003 12:22:36 +0200 (MET DST) writes:

    skon> Full_Name: SungGON Yi.  Version: 1.7.1 OS: Windows
    skon> 2000 pro Submission from: (NULL) (

    skon> p <- runif(4) rmultinom(1, 100, c(p, 0, 0, 0, 0))

    skon> That result are a wrong. 

Confirmed for R 1.8.0 beta (on Linux).

Thank you for the report!
A slightly example is

  rmultinom(1,100, c(6, 8, 4, 0,0))

which has (almost?) always an  NA at the 3rd position.

I will investigate.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><

More information about the R-devel mailing list