From maechler at stat.math.ethz.ch  Mon Oct  6 13:33:56 2003
From: maechler at stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Mon Oct  6 12:33:05 2003
Subject: [Rd] rmultinom has a bug. (PR#4431)
Message-ID: <200310061033.h96AXu0P017922@pubhealth.ku.dk>

>>>>> "skon" == skon  <skon@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) (147.46.24.107)

    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@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			<><


[Rd] rmultinom has a bug. (PR#4431)
maechler@stat.math.ethz.ch