
n
. Its purpose is similar to that of sample
, but that function fails when n
is very large.sampleInt(n, size, replace=FALSE)
sampleInt(1e+12, 10)
# this may fail:
# sample.int(1e+12, 10)
# sample.int(1e+9, 10)
Run the code above in your browser using DataLab