[R] Subsetting from pareto distribution
dwinsemius at comcast.net
Tue Apr 28 21:49:48 CEST 2015
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
subdat <- dat[sample( length(dat), 1000) ] # if "dataset" is a vector
> [[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 at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Alameda, CA, USA
More information about the R-help