Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20090415T194727-29@post.gmane.org>
Date: 2009-04-15T19:50:53Z
From: David Winsemius
Subject: Equivalent to Stata egen

Peter Kraglund Jacobsen <peter <at> kraglundjacobsen.dk> writes:

> 
> What are the R equivalents to the Stata command egen?
> 
> egen temp = anycount(t0vas t30vas t60vas t120vas t240vas t360vas),
> values(0,1,2,3,4,5,6,7,8,9,10)
> egen temp2 = rowtotal(t0vas t30vas t60vas t120vas t240vas t360vas)
> 

And people call R documentation cryptic! As far as I can tell the corresponding
function would be ave, but that is only a guess since there really is not much
help regarding egen's purpose from the voluminous Stat documentation.

-- 
David Winsemius
> ______________________________________________
> R-help <at> r-project.org mailing list
> 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.
> 
>