[R] Subsetting from pareto distribution

2015-04-28 Thread W Z
I have a dataset of 20k records heavily right skewed as pareto distribution, I'd like to pull 1k subset of it with same distribution, any R package would do that? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Subsetting from pareto distribution

2015-04-28 Thread David Winsemius
On Apr 28, 2015, at 12:20 PM, W Z wrote: > I have a dataset of 20k records heavily right skewed as pareto > distribution, I'd like to pull 1k subset of it with same distribution, any > R package would do that? Why not just: subdat <- dat[sample( nrow(dat), 1000), ] # if "dataset" is a datafram