I would like to calculate the z scores of a summed scale based on two factors: Gender, and Age group (four factors).
How can I do that in R? I'm really new to R, and only started learning, I came across
tapply(AgingData$StandMen, list(AgingData$AgeGroups, AgingData$Gender_2),
FUN= "scale")
But the result is not a data frame. How can I turn it into a data frame? Or is there any other way?