[R] Selecting random subset by ID
bgunter@4567 @end|ng |rom gm@||@com
Fri Sep 7 21:00:07 CEST 2018
Should get you started
We expect you to first make an effort to learn about and write your
own code, rather than asking us to write it for you.
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Sep 7, 2018 at 11:38 AM David Joubert <David.Joubert using uottawa.ca> wrote:
> Hello R users,
> I am working with a large dataset, including roughly 50 000 sequential observations (variable "count") for 8000 individuals (variable "id"). The dataset is very unbalanced, meaning that some individuals have few observations and others have many. Because I plan on running Generalized Linear Models for panel data using pglm and the package has file size restrictions, I want to create 4 randomly selected subsets of 2500 individuals from the main dataset. What functions and code would I use to do this?
> Thanks in advance,
> David Joubert
> [[alternative HTML version deleted]]
> R-help using 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.
More information about the R-help