[R] Equivalent to Stata egen

Peter Kraglund Jacobsen peter at kraglundjacobsen.dk
Wed Apr 15 17:32:26 CEST 2009


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)




More information about the R-help mailing list