I would like to exclude all rows in a df when it have JUST specific patterns (AA, AB, BB). My real data is have more than 20k lines and more than 2k columns! Follow a representative input example:
df <- "chr   position sample21s  sample23s sample22s
    chr2    150      AB           BB       AA       
    chr4    250      A            AA       BB
    chr5    350      AB           B        BB   
    chr7    550      AA           AA       AA
    chr8    650      BB           BB       AB"
df <- read.table(text=df, header=T)
Expected output:
chr   position sample21s  sample23s sample22s
chr4    250      A            AA       BB
chr5    350      AB           B        BB   
Any ideas?
 
     
    