Message-ID: <B62DDA17-8A98-44CA-8385-4F3A7710A924@comcast.net>
Date: 2015-04-28T19:49:48Z
From: David Winsemius
Subject: Subsetting from pareto distribution
In-Reply-To: <CAAVHDWgTcV=PEmPk-Ttstnin6qHeM0euNsy4=6xZA3p3Vm+dNw@mail.gmail.com>
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 at 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