In reply to Rick Wicklin.

That code does not work for sampling without replacement because it can output the same row multiple times. For example, when nobs=10 million, random values of 0.5 and 0.50000001 both point to the 5 millionth row.