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 dataframe

Or:

subdat <- dat[sample( length(dat), 1000) ] # if "dataset" is a vector


> 
> Thanks.
> 
>       [[alternative HTML version deleted]]

Do read the posting guide and the documentation for your mail client and learn 
how to post in plain text.
> 
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to