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)