[R] Equivalent to Stata egen
dwinsemius at comcast.net
Wed Apr 15 21:50:53 CEST 2009
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),
> 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.
> R-help <at> r-project.org mailing list
> 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