Skip to content
Prev 17723 / 398502 Next

? about sample

"jimi adams" <imij at columbus.rr.com> writes:
sample (1:4, size=1, prob=c(0,0,1,0))
             ======

The default is size=4 and subsetting the result doesn't change that.
Notice that this is sampling without replacement, so what is the
algorithm supposed to do when the first element has been sampled?