I have a large data set, but here is a small of data
df<-read.table (text=" F1 M1 Z1 B1 12 10 6 2 11 8 NA NA 13 NA 4 5 ", header=TRU