Re: [R] equivalent of group command of the egen function in Stata

2012-12-10 Thread arun
177976    y    1    5    15 #6 0.7709756    z    2    1    26 A.K. - Original Message - From: Francesco Sarracino To: r-help@r-project.org Cc: Sent: Monday, December 10, 2012 9:33 AM Subject: [R] equivalent of group command of the egen function in Stata Dear R listers, I am trying to

Re: [R] equivalent of group command of the egen function in Stata

2012-12-10 Thread arun
To: r-help@r-project.org Cc: Sent: Monday, December 10, 2012 9:33 AM Subject: [R] equivalent of group command of the egen function in Stata Dear R listers, I am trying to create a new variable that uniquely identifies groups of observations in a dataset. So far I couldn't figure out how to do this

Re: [R] equivalent of group command of the egen function in Stata

2012-12-10 Thread Ista Zahn
Hi, On Mon, Dec 10, 2012 at 9:33 AM, Francesco Sarracino wrote: > > Dear R listers, > > I am trying to create a new variable that uniquely identifies groups of > observations in a dataset. So far I couldn't figure out how to do this in > R. In Stata I would simply type: > egen newvar = group(dim1

[R] equivalent of group command of the egen function in Stata

2012-12-10 Thread Francesco Sarracino
Dear R listers, I am trying to create a new variable that uniquely identifies groups of observations in a dataset. So far I couldn't figure out how to do this in R. In Stata I would simply type: egen newvar = group(dim1, dim2, dim3) Please, find below a quick example to show what I am dealing wi