Re: [Rd] A patch for do_sample: check replace arg

2006-01-24 Thread Robert Gentleman
should be there now Seth Falcon wrote: > A colleague sent me the following: > > If you specify probabilities in the 'sample' function and forget > to type 'prob=...', then you get nonsense. E.g. > > sample(1:10,1,c(0,0,0,0,1,0,0,0,0,0)) > > does not filter '5', while >

[Rd] A patch for do_sample: check replace arg

2006-01-21 Thread Seth Falcon
A colleague sent me the following: If you specify probabilities in the 'sample' function and forget to type 'prob=...', then you get nonsense. E.g. sample(1:10,1,c(0,0,0,0,1,0,0,0,0,0)) does not filter '5', while sample(1:10,1,prob=c(0,0,0,0,1,0,0,0,0,0))