I have a data table where I want to standardize the name in "Sex" and calculate the geometric mean based on each Group (as in x, y and z in the table).
Would appreciate your help. Below are the data.table.
library(data.table)
dt <- data.table(Group = c("x","x","x","y","z","z"), Sex = c("Man","Female","Feminine","Male","M","F"), Score = c(0,0.4,0.1,0.5,3,2.1))
Thank you.