Skip to content
Prev 302350 / 398506 Next

Head or Tails game

Use a loop to run over the 10,000 reps and in each rep use
rle(x>=0) to look at the runs of nonnegative numbers, postprocessing
its output a bit to count them.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com