I have a data frame that look like this:
    df <- data.frame(subject = c(a1_1, a1_1, a1_1, a1_1, a1_2, a1_2, b1_1, b1_1),
 group = c(1, NA, NA, NA, NA, 1, NA, NA, 2, NA)
as you can see only the first entry of every subject has a group assigned. My idea is fill the blank spaces of every subject with the group number(e.g. all a1_1 must have a group 1 value).
Thanks for your help!
 
     
     
    