I have a data frame such as ;
Groups Value
G1 NA
G1 NA
G1 NA
G1 23
G2 NA
G2 NA
G2 NA
G2 NA
G2 NA
G2 NA
G3 34
G3 21
G4 NA
G4 NA
G5 NA
G5 45
and I'm looking for a code in R in order o get another data frame with binary values (1 for at least one Value in the group was a >=1) and (0 for Groups containing only NA values)
and get a new datagram such as:
G1 G2 G3 G4 G5
1 0 1 0 1
Thanks for your help.