I have a dataframe with 12 variables:
id_group1, id_group2, ..., id_group11 : 11 variables with a numeric value
mean_id: mean over all the above mentioned id_group variables
What I would need now is a new variable that contains the rowsum only for id_group variables whose value is LARGER THAN mean_id.
I am new to R and am still struggling with seemingly simple operations - so far I have tried using ifelse constructions but it never seemed to work.
Does anyone have an idea how to go about this?