Hello !
I have a dataframe with two columns : an ‘ID’ column and a column ‘V1’ with different values between 1 and 3.
I’d like to mark each ID with 1 if value 3 is present for this group and 0 otherwise.
The attachment is more clear. I’d like to obtain the column ‘Result’, based on each group of ‘Id’ and on the occurence of “'3” in the column “Var1”
Thank you by advance for your help !