From ihd at isds.duke.edu  Sat Oct 29 18:03:12 2005
From: ihd at isds.duke.edu (ihd@isds.duke.edu)
Date: Sat, 29 Oct 2005 18:03:12 +0200 (CEST)
Subject: [Rd] quirk in "sample" (PR#8264)
Message-ID: <20051029160312.6649C21EBB@slim.kubism.ku.dk>

Hi,
There is a property of "sample" that I believe is undesirable,
at least for me.
sample(1:3,1) 
chooses from the set {1,2,3}
but 
sample(3:3,1) 
chooses also from {1,2,3} even though
it would be used to sample from an interval [a,b] in general.
So  a program that generates an interval [a,b] for sampling will behave
differently when the endpoints are the same than when
the endpoints are different.

Ian



[Rd] quirk in "sample" (PR#8264)
ihd@isds.duke.edu