with replacement for random sampling if total sample number larger than the row number of the data