tidyverse: Creation of a custom grouping variable in R
I wanted to create a group variable with specific conditions based on the values of GT. If GT is ‘I’, it should generate a different group number. If GT is ‘G’, the following rules should apply:
tidyverse: Creation of a custom grouping variable in R
I wanted to create a group variable with specific conditions based on the values of GT. If GT is ‘I’, it should generate a different group number. If GT is ‘G’, the following rules should apply: