If I have a large dataset in csv file, in R, how can I take random sample of the data taking in consideration the distribution of the original data. and what if the data skewed and only 1% belong to minor class and I want to take biased sample of the data?