by-sample function

Sampling from a data frame