s-news
[Top] [All Lists]

Exhaustive Sample

To: "S-News Mailing List" <s-news@lists.biostat.wustl.edu>
Subject: Exhaustive Sample
From: jhf2@adelphia.net
Date: Tue, 30 Sep 2003 09:26:19 -0400
Hi,

I am doing an exhaustive sample, of random sizes from a population, say 1:10.
The sample sizes are controlled but the sum of the sample sizes == length(population) and the population is reduced by the latest sample at each pass.

sample(1:10, size) works fine unless at the end, population is of length 1, then, per the correct operation of sample(), I get, not the last digit but an integer between 1 and the last digit. So, I must continually test for that condition.

Is there a smarter way to reshuffle this deck into discreet units?

thanks,

john



John Fennick
jhf2@adelphia.net
Tel: 603.526.4023
134 Brookside Drive
New London, NH 03257
USA


<Prev in Thread] Current Thread [Next in Thread>
  • Exhaustive Sample, jhf2 <=